From ddec7e65612524154ae511caca11182f01e02b3b Mon Sep 17 00:00:00 2001 From: Fabio Bas Date: Thu, 12 Jun 2014 23:31:30 +0200 Subject: [PATCH] Create CMake options for components --- CMakeLists.txt | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c746074a..1cfff669 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -60,20 +60,28 @@ set(CMAKE_AUTOMOC TRUE) FIND_PACKAGE(Protobuf REQUIRED) # Compile servatrice (default off) +option(WITH_SERVER "build servatrice" OFF) add_subdirectory(common) if(WITH_SERVER) add_subdirectory(servatrice) -endif(WITH_SERVER) +endif() -# Compile cockatrice+oracle (default on) -if (NOT WITHOUT_CLIENT) +# Compile cockatrice (default on) +option(WITH_CLIENT "build cockatrice" ON) +if(WITH_CLIENT) add_subdirectory(cockatrice) - add_subdirectory(oracle) add_subdirectory(sounds) add_subdirectory(zonebg) -endif(NOT WITHOUT_CLIENT) +endif() + +# Compile oracle (default on) +option(WITH_ORACLE "build oracle" ON) +if(WITH_ORACLE) + add_subdirectory(oracle) +endif() # Compile testclient (default off) +option(WITH_TESTCLIENT "build testclient" OFF) if (WITH_TESTCLIENT) add_subdirectory(testclient) -endif(WITH_TESTCLIENT) +endif() \ No newline at end of file