summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2015-03-26 19:21:14 +0100
committerJohn Crispin <blogic@openwrt.org>2015-03-26 20:25:48 +0100
commite5331be64992e865cc7da0ccca8814d494930762 (patch)
tree0e4a6540decd07c9a3a14b4b9713fa07886037f5
parent29f139217c71c8753643779c800788783bf43c23 (diff)
downloadunitd-e5331be64992e865cc7da0ccca8814d494930762.tar
unitd-e5331be64992e865cc7da0ccca8814d494930762.zip
make jail build optional
Signed-off-by: John Crispin <blogic@openwrt.org>
-rw-r--r--CMakeLists.txt16
1 files changed, 10 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 26216cd..dfa9413 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -62,18 +62,21 @@ ADD_CUSTOM_COMMAND(
)
ADD_CUSTOM_TARGET(headers DEPENDS syscall-names.h)
-ADD_EXECUTABLE(ujail jail/jail.c jail/elf.c)
-TARGET_LINK_LIBRARIES(ujail ubox)
-INSTALL(TARGETS ujail
- RUNTIME DESTINATION sbin
-)
-
+IF(SECCOMP_SUPPORT)
ADD_LIBRARY(preload-seccomp SHARED jail/preload.c jail/seccomp.c)
TARGET_LINK_LIBRARIES(preload-seccomp dl ubox blobmsg_json)
INSTALL(TARGETS preload-seccomp
LIBRARY DESTINATION lib
)
ADD_DEPENDENCIES(preload-seccomp headers)
+endif()
+
+IF(JAIL_SUPPORT)
+ADD_EXECUTABLE(ujail jail/jail.c jail/elf.c)
+TARGET_LINK_LIBRARIES(ujail ubox)
+INSTALL(TARGETS ujail
+ RUNTIME DESTINATION sbin
+)
ADD_EXECUTABLE(utrace trace/trace.c)
TARGET_LINK_LIBRARIES(utrace ubox ${json} blobmsg_json)
@@ -87,3 +90,4 @@ TARGET_LINK_LIBRARIES(preload-trace dl)
INSTALL(TARGETS preload-trace
LIBRARY DESTINATION lib
)
+endif()