Mercurial > molko
changeset 180:43aec6678cad
cmake: add options
author | David Demelier <markand@malikania.fr> |
---|---|
date | Tue, 27 Oct 2020 14:07:18 +0100 |
parents | 5d1b7d123401 |
children | 867b60e6258a |
files | CMakeLists.txt |
diffstat | 1 files changed, 14 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/CMakeLists.txt Tue Oct 27 14:07:04 2020 +0100 +++ b/CMakeLists.txt Tue Oct 27 14:07:18 2020 +0100 @@ -34,6 +34,10 @@ set(CMAKE_EXE_LINKER_FLAGS "${options} ${CMAKE_EXE_LINKER_FLAGS}") endif () +option(MOLKO_WITH_DOXYGEN "Enable Doxygen build" On) +option(MOLKO_WITH_TESTS "Enable unit tests" On) +option(MOLKO_WITH_EXAMPLES "Enable build of examples" On) + set_property(GLOBAL PROPERTY USE_FOLDERS On) include(GNUInstallDirs) @@ -46,14 +50,14 @@ find_package(Jansson REQUIRED) find_package(SDL2 REQUIRED COMPONENTS image mixer ttf) -enable_testing() - add_subdirectory(cmake) add_subdirectory(extern/libsqlite) add_subdirectory(extern/libgreatest) -add_subdirectory(doxygen) +if (MOLKO_WITH_DOXYGEN) + add_subdirectory(doxygen) +endif () add_subdirectory(tools/bcc) add_subdirectory(tools/map) @@ -64,6 +68,11 @@ add_subdirectory(libadventure) add_subdirectory(molko) -add_subdirectory(examples) +if (MOLKO_WITH_EXAMPLES) + add_subdirectory(examples) +endif () -add_subdirectory(tests) +if (MOLKO_WITH_TESTS) + enable_testing() + add_subdirectory(tests) +endif ()