From 6b9c59efc9db4aa710d7c243d566973006020d42 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Wed, 14 Jan 2015 22:29:30 +0100 Subject: Refactor handling of platforms without user/group settings (Android) --- cmake/config.cmake | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'cmake') 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") -- cgit v1.2.3