summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2013-11-15 21:52:45 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2013-11-15 21:52:45 +0100
commit3d00ddf2968711d071b537b27c3ec208b584cbdc (patch)
tree4f62485d3d51764694b802864e695434b73c62c2 /cmake
parentefdd366144118b5f1a7bcef983a1888975aeefa0 (diff)
downloadfastd-3d00ddf2968711d071b537b27c3ec208b584cbdc.tar
fastd-3d00ddf2968711d071b537b27c3ec208b584cbdc.zip
Allow using blowfish from OpenSSL on systems where it's available anyways
Diffstat (limited to 'cmake')
-rw-r--r--cmake/config.cmake1
-rw-r--r--cmake/deps.cmake11
2 files changed, 12 insertions, 0 deletions
diff --git a/cmake/config.cmake b/cmake/config.cmake
index cc5ca01..110ad1a 100644
--- a/cmake/config.cmake
+++ b/cmake/config.cmake
@@ -18,6 +18,7 @@ endif()
set(WITH_CAPABILITIES ${LINUX} CACHE BOOL "Include support for POSIX capabilities")
set(USE_LIBSODIUM FALSE CACHE BOOL "Use libsodium instead of NaCl")
+set(USE_OPENSSL FALSE CACHE BOOL "Use OpenSSL")
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")
diff --git a/cmake/deps.cmake b/cmake/deps.cmake
index c3936af..76f5296 100644
--- a/cmake/deps.cmake
+++ b/cmake/deps.cmake
@@ -42,6 +42,17 @@ endif(USE_LIBSODIUM)
set_property(GLOBAL PROPERTY NACL_REQUIRED FALSE)
+if(USE_OPENSSL)
+ pkg_check_modules(OPENSSL_CRYPTO REQUIRED libcrypto)
+else(USE_OPENSSL)
+ set(OPENSSL_CRYPTO_INCLUDE_DIRS "")
+ set(OPENSSL_CRYPTO_CFLAGS_OTHER "")
+ set(OPENSSL_CRYPTO_LIBRARY_DIRS "")
+ set(OPENSSL_CRYPTO_LIBRARIES "")
+ set(OPENSSL_CRYPTO_LDFLAGS_OTHER "")
+endif(USE_OPENSSL)
+
+
if(WITH_CAPABILITIES)
find_package(CAP REQUIRED)
else(WITH_CAPABILITIES)