aboutsummaryrefslogtreecommitdiff
path: root/libcmix-crypto/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'libcmix-crypto/CMakeLists.txt')
-rw-r--r--libcmix-crypto/CMakeLists.txt29
1 files changed, 10 insertions, 19 deletions
diff --git a/libcmix-crypto/CMakeLists.txt b/libcmix-crypto/CMakeLists.txt
index 907c601..d40d44e 100644
--- a/libcmix-crypto/CMakeLists.txt
+++ b/libcmix-crypto/CMakeLists.txt
@@ -1,10 +1,16 @@
-add_library(cmix-crypto-interface INTERFACE)
+add_library(cmix-crypto INTERFACE)
-target_include_directories(cmix-crypto-interface
+target_include_directories(cmix-crypto
INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}
)
+target_sources(cmix-crypto
+ INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/keypair.h
+ INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/keymanagement.h
+ INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/message.h
+)
+
include(curve25519_implementations)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/curve25519/)
@@ -12,24 +18,9 @@ include(rsa_implementations)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/rsa)
-add_library(cmix-crypto
- message.h message.c
- keymanagement.h keymanagement.c
- keypair.h
-)
-
-target_include_directories(cmix-crypto
- PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}
-)
-
-target_compile_options(cmix-crypto
- PRIVATE "-std=c99"
-)
-
option(UseEC "Use curve25519 instead of RSA" ON)
-
target_link_libraries(cmix-crypto
- PUBLIC curve25519-implementation
-# PUBLIC rsa-implementation
+ INTERFACE curve25519-implementation
+# INTERFACE rsa-implementation
)