summaryrefslogtreecommitdiffstats
path: root/src/crypto/cipher/aes128_ctr
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 /src/crypto/cipher/aes128_ctr
parente7893cc54fb0eaba0cfe88ff44cf52a3f7ff2200 (diff)
downloadfastd-eabbb5eb368df3ff606a472bd96a4a4077a214d8.tar
fastd-eabbb5eb368df3ff606a472bd96a4a4077a214d8.zip
Improve build system for ciphers and MACs as well
Diffstat (limited to 'src/crypto/cipher/aes128_ctr')
-rw-r--r--src/crypto/cipher/aes128_ctr/CMakeLists.txt20
-rw-r--r--src/crypto/cipher/aes128_ctr/nacl/CMakeLists.txt6
2 files changed, 5 insertions, 21 deletions
diff --git a/src/crypto/cipher/aes128_ctr/CMakeLists.txt b/src/crypto/cipher/aes128_ctr/CMakeLists.txt
index 6237a7c..16eeeab 100644
--- a/src/crypto/cipher/aes128_ctr/CMakeLists.txt
+++ b/src/crypto/cipher/aes128_ctr/CMakeLists.txt
@@ -1,18 +1,2 @@
-set(IMPLS "")
-
-if(WITH_CIPHER_AES128_CTR_NACL)
- list(APPEND IMPLS nacl)
-endif(WITH_CIPHER_AES128_CTR_NACL)
-
-set(IMPL_SOURCES "")
-
-foreach(impl ${IMPLS})
- add_subdirectory(${impl})
-
- list(APPEND IMPL_SOURCES $<TARGET_OBJECTS:cipher_aes128_ctr_${impl}>)
-endforeach(impl)
-
-
-set(CIPHER_NAME "aes128-ctr" PARENT_SCOPE)
-set(IMPLS "${IMPLS}" PARENT_SCOPE)
-set(IMPL_SOURCES "${IMPL_SOURCES}" PARENT_SCOPE)
+fastd_cipher(aes128-ctr)
+add_subdirectory(nacl)
diff --git a/src/crypto/cipher/aes128_ctr/nacl/CMakeLists.txt b/src/crypto/cipher/aes128_ctr/nacl/CMakeLists.txt
index ab0d0e8..50e2283 100644
--- a/src/crypto/cipher/aes128_ctr/nacl/CMakeLists.txt
+++ b/src/crypto/cipher/aes128_ctr/nacl/CMakeLists.txt
@@ -1,5 +1,5 @@
-add_library(cipher_aes128_ctr_nacl OBJECT
+fastd_cipher_impl(aes128-ctr nacl
cipher_aes128_ctr_nacl.c
)
-set_property(TARGET cipher_aes128_ctr_nacl PROPERTY COMPILE_FLAGS "${FASTD_CFLAGS}")
-target_include_directories(cipher_aes128_ctr_nacl PRIVATE ${NACL_INCLUDE_DIRS})
+fastd_cipher_impl_include_directories(aes128-ctr nacl ${NACL_INCLUDE_DIRS})
+fastd_cipher_impl_link_libraries(aes128-ctr nacl ${NACL_LIBRARIES})