make jail build optional
authorJohn Crispin <blogic@openwrt.org>
Thu, 26 Mar 2015 18:21:14 +0000 (19:21 +0100)
committerJohn Crispin <blogic@openwrt.org>
Thu, 26 Mar 2015 19:25:48 +0000 (20:25 +0100)
Signed-off-by: John Crispin <blogic@openwrt.org>
CMakeLists.txt

index 26216cd44bdfb925ddd38177286f5d2927178079..dfa94139eb9ddb159845aadb7d3a7303f2d02368 100644 (file)
@@ -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()