Rework CMakeList.txt
authorJosé Bollo <jose.bollo@iot.bzh>
Tue, 29 Aug 2017 08:25:50 +0000 (10:25 +0200)
committerJosé Bollo <jose.bollo@iot.bzh>
Tue, 29 Aug 2017 08:25:50 +0000 (10:25 +0200)
Explicit options and add a definition for AGL_DEVEL

Change-Id: I8419f0b0dfecc1e0171c282573cdf32ae3f09704
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
CMakeLists.txt

index 3d7e1d0..1037b43 100644 (file)
@@ -37,6 +37,11 @@ INCLUDE(CheckLibraryExists)
 INCLUDE(GNUInstallDirs)
 INCLUDE(CTest)
 
+###########################################################################
+# possible settings
+set(AGL_DEVEL OFF CACHE BOOL "Activates developping features")
+set(INCLUDE_MONITORING OFF CACHE BOOL "Activates installation of monitoring")
+
 ###########################################################################
 
 link_libraries(-Wl,--as-needed -Wl,--gc-sections -Wl,--no-undefined)
@@ -82,6 +87,10 @@ PKG_CHECK_MODULES(openssl REQUIRED openssl)
 PKG_CHECK_MODULES(uuid REQUIRED uuid)
 PKG_CHECK_MODULES(cynara cynara-client)
 
+IF(AGL_DEVEL)
+       ADD_DEFINITIONS(-DAGL_DEVEL)
+endif()
+
 IF(cynara_FOUND)
        ADD_DEFINITIONS(-DBACKEND_PERMISSION_IS_CYNARA)
 ENDIF(cynara_FOUND)