summaryrefslogtreecommitdiffstats
path: root/cmake/config.cmake
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2013-11-02 17:42:30 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2013-11-02 17:47:20 +0100
commit38b7d50694b4a9929cc0d5bca884a52d5aeaa8a4 (patch)
tree8d5c690296423b9261a864c1b8cfde06b85d9d9a /cmake/config.cmake
parentcd47acaf3cc874f8d26acca56fa6cef6110d946d (diff)
downloadfastd-38b7d50694b4a9929cc0d5bca884a52d5aeaa8a4.tar
fastd-38b7d50694b4a9929cc0d5bca884a52d5aeaa8a4.zip
Separate cmake files
Diffstat (limited to 'cmake/config.cmake')
-rw-r--r--cmake/config.cmake40
1 files changed, 40 insertions, 0 deletions
diff --git a/cmake/config.cmake b/cmake/config.cmake
new file mode 100644
index 0000000..dd8d8c8
--- /dev/null
+++ b/cmake/config.cmake
@@ -0,0 +1,40 @@
+if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
+ set(LINUX TRUE)
+else()
+ set(LINUX FALSE)
+endif()
+
+
+set(USE_BINDTODEVICE ${LINUX})
+set(USE_PMTU ${LINUX})
+set(USE_PKTINFO ${LINUX})
+
+if(${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD")
+ set(USE_MULTIAF_BIND FALSE)
+else()
+ set(USE_MULTIAF_BIND TRUE)
+endif()
+
+set(WITH_CAPABILITIES ${LINUX} CACHE BOOL "Include support for POSIX capabilities")
+
+set(USE_LIBSODIUM FALSE CACHE BOOL "Use libsodium instead of NaCl")
+
+set(WITH_CMDLINE_USER TRUE CACHE BOOL "Include support for setting user/group related options on the command line")
+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")
+
+set(MAX_CONFIG_DEPTH 10 CACHE STRING "Maximum config include depth")
+
+set(WITH_CIPHER_AES128_CTR TRUE CACHE BOOL "Include the AES128-CTR cipher algorithm")
+set(WITH_CIPHER_AES128_CTR_NACL TRUE CACHE BOOL "Include the AES128-CTR implementation from the NaCl library")
+
+set(WITH_MAC_GHASH TRUE CACHE BOOL "Include the GHASH MAC algorithm")
+set(WITH_MAC_GHASH_BUILTIN TRUE CACHE BOOL "Include the built-in GHASH implementation")
+
+set(WITH_METHOD_XSALSA20_POLY1305 TRUE CACHE BOOL "Include xsalsa20-poly1305 method")
+set(WITH_METHOD_GENERIC_GCM TRUE CACHE BOOL "Include generic gcm method")
+
+
+# Ensure the value is numeric
+math(EXPR MAX_CONFIG_DEPTH_NUM ${MAX_CONFIG_DEPTH})