summaryrefslogtreecommitdiffstats
path: root/src/CMakeLists.txt
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2016-10-20 11:12:06 +0200
committerJosé Bollo <jose.bollo@iot.bzh>2016-10-20 12:00:52 +0200
commit18103e986d89b9e329f49d9329d8bc40dffd39eb (patch)
tree2cee41c95354be7f2e3fa7078fd50e2b86770363 /src/CMakeLists.txt
parent38ba270af828b80e0ffb5eab955aff733de17dba (diff)
build: improve simulation of security
This commits allows to simulates either the security-manager and the smack LSM. These simulations are used for developping purpose. Change-Id: I138d7351511ca2663498bfacca28811fc81b8c55 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r--src/CMakeLists.txt19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 6610251..91a2cc1 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -58,14 +58,25 @@ endif()
###########################################################################
-if(USE_SIMULATION)
- include_directories(simulation)
-else(USE_SIMULATION)
+if(SIMULATE_SECMGR)
+ add_definitions(-DSIMULATE_SECURITY_MANAGER=1)
+else(SIMULATE_SECMGR)
pkg_check_modules(SECMGR REQUIRED security-manager)
add_compile_options(${SECMGR_CFLAGS})
include_directories(${SECMGR_INCLUDE_DIRS})
link_libraries(${SECMGR_LIBRARIES})
-endif(USE_SIMULATION)
+ add_definitions(-DSIMULATE_SECURITY_MANAGER=0)
+endif(SIMULATE_SECMGR)
+
+if(SIMULATE_SMACK)
+ add_definitions(-DSIMULATE_LIBSMACK=1)
+else(SIMULATE_SMACK)
+ pkg_check_modules(SMACK REQUIRED libsmack)
+ add_compile_options(${SMACK_CFLAGS})
+ include_directories(${SMACK_INCLUDE_DIRS})
+ link_libraries(${SMACK_LIBRARIES})
+ add_definitions(-DSIMULATE_LIBSMACK=0)
+endif(SIMULATE_SMACK)
###########################################################################