summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cmake/deps.cmake5
-rw-r--r--src/CMakeLists.txt2
-rw-r--r--src/crypto/cipher/aes128_ctr/nacl/CMakeLists.txt2
-rw-r--r--src/crypto/cipher/salsa20/nacl/CMakeLists.txt2
-rw-r--r--src/crypto/cipher/salsa2012/nacl/CMakeLists.txt2
-rw-r--r--src/methods/generic_poly1305/CMakeLists.txt2
-rw-r--r--src/methods/xsalsa20_poly1305/CMakeLists.txt2
7 files changed, 9 insertions, 8 deletions
diff --git a/cmake/deps.cmake b/cmake/deps.cmake
index ec77e1d..016255e 100644
--- a/cmake/deps.cmake
+++ b/cmake/deps.cmake
@@ -12,7 +12,7 @@ endif(ANDROID)
find_package(libuecc REQUIRED)
-set(NACL_INCLUDE_DIR)
+set(NACL_INCLUDE_DIRS)
set(NACL_CFLAGS_OTHER)
set(NACL_LIBRARIES)
set(NACL_LDFLAGS_OTHER)
@@ -21,7 +21,7 @@ if(ENABLE_LIBSODIUM)
find_package(libsodium)
if(LIBSODIUM_FOUND)
- set(NACL_INCLUDE_DIR "${LIBSODIUM_INCLUDE_DIR}/sodium")
+ set(NACL_INCLUDE_DIRS "${LIBSODIUM_INCLUDE_DIR};${LIBSODIUM_INCLUDE_DIR}/sodium")
set(NACL_LIBRARIES "${LIBSODIUM_LIBRARIES}")
set(NACL_CFLAGS_OTHER "${LIBSODIUM_CFLAGS_OTHER}")
set(NACL_LDFLAGS_OTHER "${LIBSODIUM_LDFLAGS_OTHER}")
@@ -29,6 +29,7 @@ if(ENABLE_LIBSODIUM)
else(ENABLE_LIBSODIUM)
find_package(NaCl)
+ set(NACL_INCLUDE_DIRS "${NACL_INCLUDE_DIR}")
set(NACL_LIBRARIES "${NACL_LIBRARY}")
endif(ENABLE_LIBSODIUM)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index c92e457..829b3ab 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -47,7 +47,7 @@ add_executable(fastd
)
set_property(TARGET fastd PROPERTY COMPILE_FLAGS "${FASTD_CFLAGS}")
set_property(TARGET fastd PROPERTY LINK_FLAGS "${PTHREAD_LDFLAGS} ${LIBUECC_LDFLAGS_OTHER} ${NACL_LDFLAGS_OTHER} ${JSON_C_LDFLAGS_OTHER} ${LDFLAGS_LTO}")
-set_property(TARGET fastd APPEND PROPERTY INCLUDE_DIRECTORIES ${LIBCAP_INCLUDE_DIR} ${NACL_INCLUDE_DIR} ${JSON_C_INCLUDE_DIR})
+set_property(TARGET fastd APPEND PROPERTY INCLUDE_DIRECTORIES ${LIBCAP_INCLUDE_DIR} ${NACL_INCLUDE_DIRS} ${JSON_C_INCLUDE_DIR})
target_link_libraries(fastd protocols methods ciphers macs ${RT_LIBRARY} ${LIBCAP_LIBRARY} ${LIBUECC_LIBRARIES} ${NACL_LIBRARIES} ${OPENSSL_CRYPTO_LIBRARY} ${JSON_C_LIBRARIES})
add_dependencies(fastd version)
diff --git a/src/crypto/cipher/aes128_ctr/nacl/CMakeLists.txt b/src/crypto/cipher/aes128_ctr/nacl/CMakeLists.txt
index 0740c7d..676aa5d 100644
--- a/src/crypto/cipher/aes128_ctr/nacl/CMakeLists.txt
+++ b/src/crypto/cipher/aes128_ctr/nacl/CMakeLists.txt
@@ -1,6 +1,6 @@
fastd_cipher_impl(aes128-ctr nacl
cipher_aes128_ctr_nacl.c
)
-fastd_cipher_impl_include_directories(aes128-ctr nacl ${NACL_INCLUDE_DIR})
+fastd_cipher_impl_include_directories(aes128-ctr nacl ${NACL_INCLUDE_DIRS})
fastd_cipher_impl_link_libraries(aes128-ctr nacl ${NACL_LIBRARIES})
fastd_cipher_impl_require(aes128-ctr nacl NACL)
diff --git a/src/crypto/cipher/salsa20/nacl/CMakeLists.txt b/src/crypto/cipher/salsa20/nacl/CMakeLists.txt
index 2b550c1..d76ff34 100644
--- a/src/crypto/cipher/salsa20/nacl/CMakeLists.txt
+++ b/src/crypto/cipher/salsa20/nacl/CMakeLists.txt
@@ -1,6 +1,6 @@
fastd_cipher_impl(salsa20 nacl
salsa20_nacl.c
)
-fastd_cipher_impl_include_directories(salsa20 nacl ${NACL_INCLUDE_DIR})
+fastd_cipher_impl_include_directories(salsa20 nacl ${NACL_INCLUDE_DIRS})
fastd_cipher_impl_link_libraries(salsa20 nacl ${NACL_LIBRARIES})
fastd_cipher_impl_require(salsa20 nacl NACL)
diff --git a/src/crypto/cipher/salsa2012/nacl/CMakeLists.txt b/src/crypto/cipher/salsa2012/nacl/CMakeLists.txt
index 54487e7..3d47621 100644
--- a/src/crypto/cipher/salsa2012/nacl/CMakeLists.txt
+++ b/src/crypto/cipher/salsa2012/nacl/CMakeLists.txt
@@ -1,6 +1,6 @@
fastd_cipher_impl(salsa2012 nacl
salsa2012_nacl.c
)
-fastd_cipher_impl_include_directories(salsa2012 nacl ${NACL_INCLUDE_DIR})
+fastd_cipher_impl_include_directories(salsa2012 nacl ${NACL_INCLUDE_DIRS})
fastd_cipher_impl_link_libraries(salsa2012 nacl ${NACL_LIBRARIES})
fastd_cipher_impl_require(salsa2012 nacl NACL)
diff --git a/src/methods/generic_poly1305/CMakeLists.txt b/src/methods/generic_poly1305/CMakeLists.txt
index 18f2382..cafa288 100644
--- a/src/methods/generic_poly1305/CMakeLists.txt
+++ b/src/methods/generic_poly1305/CMakeLists.txt
@@ -1,6 +1,6 @@
fastd_method(generic-poly1305
generic_poly1305.c
)
-fastd_method_include_directories(generic-poly1305 ${NACL_INCLUDE_DIR})
+fastd_method_include_directories(generic-poly1305 ${NACL_INCLUDE_DIRS})
fastd_method_link_libraries(generic-poly1305 method_common ${NACL_LIBRARIES})
fastd_method_require(generic-poly1305 NACL)
diff --git a/src/methods/xsalsa20_poly1305/CMakeLists.txt b/src/methods/xsalsa20_poly1305/CMakeLists.txt
index 7dc2339..97dee39 100644
--- a/src/methods/xsalsa20_poly1305/CMakeLists.txt
+++ b/src/methods/xsalsa20_poly1305/CMakeLists.txt
@@ -1,6 +1,6 @@
fastd_method(xsalsa20-poly1305
xsalsa20_poly1305.c
)
-fastd_method_include_directories(xsalsa20-poly1305 ${NACL_INCLUDE_DIR})
+fastd_method_include_directories(xsalsa20-poly1305 ${NACL_INCLUDE_DIRS})
fastd_method_link_libraries(xsalsa20-poly1305 method_common ${NACL_LIBRARIES})
fastd_method_require(xsalsa20-poly1305 NACL)