I wrote a CMake build script to build BZWorkbench a while ago as a project to learn CMake. You can use it to build BZWb. I updated it to work with the current svn code. I should mention that, even though it compiles fine, it always has problems finding and loading the OpenThreads and OSG lbraries. I always have to run it in gdb.
Also, the FindOSG cmake package doesn't work with the OSG frameworks downloaded from http://www.cuboslocos.com/tutorials/OSG-GettingStarted
. For some reason cmake can't get the version information. I would install OSG either by using macports or compiling it yourself. If you want to build OSG as a universal library, I recommend installing gdal and its dependencies from http://www.kyngchaos.com/software:frameworks
because compiling gdal as a universal binary is a pain. You need gdal, as the osgTerrain library requires it. You could probably skip that library though.
To use this, copy CMakeLists.txt to bzworkbench/, and create a build folder. This is so you can do an out-of-source build, which has the benefit of not placing the object files in the source tree. If your build folder is CMakeBuild, then do...
Code: Select all
I should also add that I wrote this after using CMake for about a day. It's not meant to be a complete build system.