diff --git a/CMakeLists.txt b/CMakeLists.txt index ec88dcec..4e92c721 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,6 +24,7 @@ project(crypto C) set(SA_CUSTOM_PATH_DEFAULT "../../sa/custom") set(KEY_CUSTOM_PATH_DEFAULT "../../key/custom") set(MC_CUSTOM_PATH_DEFAULT "../../mc/custom") +set(CRYPTO_CUSTOM_PATH_DEFAULT "../../crypto/custom") @@ -36,6 +37,8 @@ option(CODECOV "Code Coverage" OFF) option(CRYPTO_LIBGCRYPT "Cryptography Module - Libgcrypt" ON) option(CRYPTO_KMC "Cryptography Module - KMC" OFF) option(CRYPTO_WOLFSSL "Cryptography Module - WolfSSL" OFF) +option(CRYPTO_CUSTOM "Cryptography Module - CUSTOM" OFF) +option(CRYPTO_CUSTOM_PATH "Cryptography Module - CUSTOM PATH" OFF) option(DEBUG "Debug" OFF) option(KEY_CUSTOM "Key Module - Custom" OFF) option(KEY_CUSTOM_PATH "Custom Key Path" OFF) @@ -83,6 +86,13 @@ if(SA_CUSTOM) message(STATUS "SA_CUSTOM being utilized. Path set to: ${SA_CUSTOM_PATH}") endif() +if(CRYPTO_CUSTOM) + if(NOT DEFINED ${CRYPTO_CUSTOM_PATH}) + set(CRYPTO_CUSTOM_PATH ${CRYPTO_CUSTOM_PATH_DEFAULT}) + endif() + message(STATUS "CRYPTO_CUSTOM being utilized. Path set to: ${CRYPTO_CUSTOM_PATH}") +endif() + # # Build Flag Logic diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index dec1fb70..26e32e0c 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -19,6 +19,14 @@ include_directories(../include) aux_source_directory(core LIB_SRC_FILES) +if(CRYPTO_CUSTOM) + aux_source_directory(CRYPTO_CUSTOM_PATH CRYPTO_FILES) + list(APPEND LIB_SRC_FILES ${CRYPTO_FILES}) +else() + aux_source_directory(crypto/custom_stub CRYPTO_FILES) + list(APPEND LIB_SRC_FILES ${CRYPTO_FILES}) +endif() + if(CRYPTO_LIBGCRYPT) aux_source_directory(crypto/libgcrypt LIBGCRYPT_FILES) list(APPEND LIB_SRC_FILES ${LIBGCRYPT_FILES})