"Simon Richter" <simon.rich...@hogyros.de> wrote: > With my Debian Developer hat on: please also add a mechanism to manually > specify whether the optional component should be built. If the > dependency changes and suddenly a component goes missing without > triggering a build failure, that can be rather annoying for users. > > Without a package system, this also means that old files may stick > around after installation, so your program should be aware that > installed plugins could be built against an older API and weren't > updated during the last install run.
I'd like to do that if I'd know how to achieve that using cmake. But I find cmake is much too large and is incapable of many things I'd expect from a build system tool. It also makes development ugly for the Unix accustomed developer, only to make things portable to Windows, which I don't want anyway. Currently, we have a shell script wrapper around cmake that does something like if [ <dependencies for foo available> ]; then BUILD_FOO=true else BUILD_FOO=false fi and in CMakeLists.txt set(BUILD_FOO "true" CACHE BOOL "description") ... if (BUILD_FOO) add_subdirectory(foo) endif() This is *ugly* but I don't know how to do this in cmake. Steve -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake