summaryrefslogtreecommitdiffstats
path: root/cmake/deps.cmake
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2013-11-03 03:34:00 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2013-11-03 03:34:00 +0100
commiteabbb5eb368df3ff606a472bd96a4a4077a214d8 (patch)
tree211ad12c827a823949b1c5c3cc9dc4343e85ca01 /cmake/deps.cmake
parente7893cc54fb0eaba0cfe88ff44cf52a3f7ff2200 (diff)
downloadfastd-eabbb5eb368df3ff606a472bd96a4a4077a214d8.tar
fastd-eabbb5eb368df3ff606a472bd96a4a4077a214d8.zip
Improve build system for ciphers and MACs as well
Diffstat (limited to 'cmake/deps.cmake')
-rw-r--r--cmake/deps.cmake38
1 files changed, 18 insertions, 20 deletions
diff --git a/cmake/deps.cmake b/cmake/deps.cmake
index e49efcd..fa3cb03 100644
--- a/cmake/deps.cmake
+++ b/cmake/deps.cmake
@@ -16,26 +16,24 @@ set(NACL_LIBRARY_DIRS "")
set(NACL_LIBRARIES "")
set(NACL_LDFLAGS_OTHER "")
-if(WITH_METHOD_XSALSA20_POLY1305 OR WITH_CIPHER_AES128_CTR_NACL)
- if(USE_LIBSODIUM)
- pkg_check_modules(SODIUM REQUIRED libsodium)
-
- set(NACL_INCLUDE_DIRS "${SODIUM_INCLUDE_DIRS}")
- foreach(dir "${SODIUM_INCLUDEDIR}" ${SODIUM_INCLUDE_DIRS})
- list(APPEND NACL_INCLUDE_DIRS "${dir}/sodium")
- endforeach(dir)
-
- set(NACL_CFLAGS_OTHER "${SODIUM_CFLAGS_OTHER}")
- set(NACL_LIBRARY_DIRS "${SODIUM_LIBRARY_DIRS}")
- set(NACL_LIBRARIES "${SODIUM_LIBRARIES}")
- set(NACL_LDFLAGS_OTHER "${SODIUM_LDFLAGS_OTHER}")
- else(USE_LIBSODIUM)
- find_package(NaCl REQUIRED)
-
- set(NACL_INCLUDE_DIRS "${NACL_INCLUDE_DIR}")
- set(NACL_LIBRARIES "${NACL_LIBRARY}")
- endif(USE_LIBSODIUM)
-endif()
+if(USE_LIBSODIUM)
+ pkg_check_modules(SODIUM REQUIRED libsodium)
+
+ set(NACL_INCLUDE_DIRS "${SODIUM_INCLUDE_DIRS}")
+ foreach(dir "${SODIUM_INCLUDEDIR}" ${SODIUM_INCLUDE_DIRS})
+ list(APPEND NACL_INCLUDE_DIRS "${dir}/sodium")
+ endforeach(dir)
+
+ set(NACL_CFLAGS_OTHER "${SODIUM_CFLAGS_OTHER}")
+ set(NACL_LIBRARY_DIRS "${SODIUM_LIBRARY_DIRS}")
+ set(NACL_LIBRARIES "${SODIUM_LIBRARIES}")
+ set(NACL_LDFLAGS_OTHER "${SODIUM_LDFLAGS_OTHER}")
+else(USE_LIBSODIUM)
+ find_package(NaCl REQUIRED)
+
+ set(NACL_INCLUDE_DIRS "${NACL_INCLUDE_DIR}")
+ set(NACL_LIBRARIES "${NACL_LIBRARY}")
+endif(USE_LIBSODIUM)
if(WITH_CAPABILITIES)