summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2015-01-14 22:29:30 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2015-01-14 22:29:30 +0100
commit6b9c59efc9db4aa710d7c243d566973006020d42 (patch)
treef8da5b18b935f603b72eb37898f57a9df19369e1 /cmake
parentba3afc50b3819694f009adc6db5a966f524242f6 (diff)
downloadfastd-6b9c59efc9db4aa710d7c243d566973006020d42.tar
fastd-6b9c59efc9db4aa710d7c243d566973006020d42.zip
Refactor handling of platforms without user/group settings (Android)
Diffstat (limited to 'cmake')
-rw-r--r--cmake/config.cmake17
1 files changed, 16 insertions, 1 deletions
diff --git a/cmake/config.cmake b/cmake/config.cmake
index e6b70a2..049304f 100644
--- a/cmake/config.cmake
+++ b/cmake/config.cmake
@@ -18,6 +18,14 @@ set(USE_PMTU ${LINUX})
set(USE_PKTINFO ${LINUX})
set(USE_PACKET_MARK ${LINUX})
+
+if(ANDROID)
+ set(USE_USER FALSE)
+else(ANDROID)
+ set(USE_USER TRUE)
+endif(ANDROID)
+
+
# OSX doesn't support poll on devices...
set(USE_SELECT ${DARWIN})
@@ -36,9 +44,16 @@ set(ENABLE_LTO FALSE CACHE BOOL "Enable link-time optimization")
if(LINUX AND NOT ANDROID)
set(ENABLE_SYSTEMD TRUE CACHE BOOL "Enable systemd support")
+else(LINUX AND NOT ANDROID)
+ set(ENABLE_SYSTEMD FALSE)
endif(LINUX AND NOT ANDROID)
-set(WITH_CMDLINE_USER TRUE CACHE BOOL "Include support for setting user/group related options on the command line")
+if(USE_USER)
+ set(WITH_CMDLINE_USER TRUE CACHE BOOL "Include support for setting user/group related options on the command line")
+else(USE_USER)
+ set(WITH_CMDLINE_USER FALSE)
+endif(USE_USER)
+
set(WITH_CMDLINE_LOGGING TRUE CACHE BOOL "Include support for setting logging related options on the command line")
set(WITH_CMDLINE_OPERATION TRUE CACHE BOOL "Include support for setting options related to the VPN operation (like mode, interface, encryption method) on the command line")
set(WITH_CMDLINE_COMMANDS TRUE CACHE BOOL "Include support for setting handler scripts (e.g. --on-up) on the command line")