Another attempt at a cmake build system

Discuss about anything related to the Irrlicht Engine, or read announcements about any significant features or usage changes.
Post Reply
mjansen
Posts: 1
Joined: Sun May 23, 2010 9:45 pm

Another attempt at a cmake build system

Post by mjansen »

Get the patch from http://michael-jansen.biz/sites/default ... make.patch

It is more or less feature complete if we only look at the linux platform. Since i only have linux and failed at crosscompiling for windows (Mingw seems to be not supported) that is all i can finish.

# Standard CMake Options
-DBUILD_SHARED_LIBS=On/Off -> Build static/shared lib
-DCMAKE_DEBUG_POSTFIX="_d" -> Postfix debug libs ("" by default)
-DCMAKE_BUILD_TYPE="Release, RelWithDebInfo, Debug"

-DIRRLICHT_BUILD_TOOLS=On/Off -> Build/Install Tools
-DIRRLICHT_BUILD_EXAMPLES=On/Off -> Build/Install Examples
-DIRRLICHT_INSTALL_SDK=On/Off -> Install headers
-DIRRLICHT_INSTALL_DOC=On/Off -> Install Documentation

For shared libs build the systems png, zlib, jpeglib and bzip2 libraries are used if present. If not it fallbacks to the internal version. Static always uses the internal versions.

Media is only installed if either tools or examples are installed. Still to much but we would have to change that later.

Full control where things end up for the builder
-DIRRLICHT_(ARCHIVE|LIBRARY|BINARY|MEDIA|DOCS|PUB_HEADER)_DIR Variable control that.

- Supports to install sdk in parallel (include, libs are postfixed with version)
- Supports find_package(Irrlicht) out of the box. if CMAKE_DEBUG_POSTFIX is used find_package(Irrlicht${CMAKE_DEBUG_POSTFIX} is supported in parallel)

I think i ported the Makefile correctly but tell me if something is missing.

Currenlty the executables have to be installed to run. I think about providing a parameter -DIRRLICHT_INSTALL=On/Off. If Off i would like to build everything so it doesn't have to be installed. If such a feature is needed.

Mike
Post Reply