summaryrefslogtreecommitdiffstats
path: root/src/crypto/cipher/CMakeLists.txt
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2014-04-30 03:40:15 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2014-04-30 03:40:15 +0200
commit8e589f3a3ad74dd4409632222c589aea7c0939a5 (patch)
tree8806a5a828ca1c0449b63c3a80f72f00226715f4 /src/crypto/cipher/CMakeLists.txt
parent0d0a857c696b653a65c709bbfb11bdaff67369b8 (diff)
downloadfastd-8e589f3a3ad74dd4409632222c589aea7c0939a5.tar
fastd-8e589f3a3ad74dd4409632222c589aea7c0939a5.zip
Fix CMake errors on some config combinations
Diffstat (limited to 'src/crypto/cipher/CMakeLists.txt')
-rw-r--r--src/crypto/cipher/CMakeLists.txt21
1 files changed, 18 insertions, 3 deletions
diff --git a/src/crypto/cipher/CMakeLists.txt b/src/crypto/cipher/CMakeLists.txt
index a9d9abe..ff67b82 100644
--- a/src/crypto/cipher/CMakeLists.txt
+++ b/src/crypto/cipher/CMakeLists.txt
@@ -23,15 +23,30 @@ macro(fastd_cipher_impl cipher name)
endmacro(fastd_cipher_impl)
macro(fastd_cipher_impl_include_directories cipher name)
- fastd_module_include_directories(cipher "${cipher} ${name}" ${ARGN})
+ string(REPLACE - _ cipher_ "${cipher}")
+ string(TOUPPER "${cipher_}" CIPHER)
+
+ if(WITH_CIPHER_${CIPHER})
+ fastd_module_include_directories(cipher "${cipher} ${name}" ${ARGN})
+ endif(WITH_CIPHER_${CIPHER})
endmacro(fastd_cipher_impl_include_directories)
macro(fastd_cipher_impl_link_libraries cipher name)
- fastd_module_link_libraries(cipher "${cipher} ${name}" ${ARGN})
+ string(REPLACE - _ cipher_ "${cipher}")
+ string(TOUPPER "${cipher_}" CIPHER)
+
+ if(WITH_CIPHER_${CIPHER})
+ fastd_module_link_libraries(cipher "${cipher} ${name}" ${ARGN})
+ endif(WITH_CIPHER_${CIPHER})
endmacro(fastd_cipher_impl_link_libraries)
macro(fastd_cipher_impl_require cipher name)
- fastd_module_require(cipher "${cipher} ${name}" ${ARGN})
+ string(REPLACE - _ cipher_ "${cipher}")
+ string(TOUPPER "${cipher_}" CIPHER)
+
+ if(WITH_CIPHER_${CIPHER})
+ fastd_module_require(cipher "${cipher} ${name}" ${ARGN})
+ endif(WITH_CIPHER_${CIPHER})
endmacro(fastd_cipher_impl_require)