Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[nasa/cryptolib#249] Fixed custom path cmake variable usage #250

Merged
merged 1 commit into from
Jun 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -67,29 +67,33 @@ OPTION(KMC_CFFI_EXCLUDE "KMC-Exclude-Problematic-CFFI-Code" OFF) #Disabled by de
# Custom Module Paths
#
if(KEY_CUSTOM)
if(NOT DEFINED ${KEY_CUSTOM_PATH})
if(NOT DEFINED KEY_CUSTOM_PATH)
set(KEY_CUSTOM_PATH ${KEY_CUSTOM_PATH_DEFAULT})
message(STATUS "Default path set for KEY_CUSTOM_PATH")
endif()
message(STATUS "KEY_CUSTOM being utilized. Path set to: ${KEY_CUSTOM_PATH}")
endif()

if(MC_CUSTOM)
if(NOT DEFINED ${KEY_CUSTOM_PATH})
if(NOT DEFINED MC_CUSTOM_PATH)
set(MC_CUSTOM_PATH ${MC_CUSTOM_PATH_DEFAULT})
message(STATUS "Default path set for MC_CUSTOM_PATH")
endif()
message(STATUS "MC_CUSTOM being utilized. Path set to: ${MC_CUSTOM_PATH}")
endif()

if(SA_CUSTOM)
if(NOT DEFINED ${SA_CUSTOM_PATH})
if(NOT DEFINED SA_CUSTOM_PATH)
set(SA_CUSTOM_PATH ${SA_CUSTOM_PATH_DEFAULT})
message(STATUS "Default path set for SA_CUSTOM_PATH")
endif()
message(STATUS "SA_CUSTOM being utilized. Path set to: ${SA_CUSTOM_PATH}")
endif()

if(CRYPTO_CUSTOM)
if(NOT DEFINED ${CRYPTO_CUSTOM_PATH})
if(NOT DEFINED CRYPTO_CUSTOM_PATH)
set(CRYPTO_CUSTOM_PATH ${CRYPTO_CUSTOM_PATH_DEFAULT})
message(STATUS "Default path set for CRYPTO_CUSTOM_PATH")
endif()
message(STATUS "CRYPTO_CUSTOM being utilized. Path set to: ${CRYPTO_CUSTOM_PATH}")
endif()
Expand Down
8 changes: 4 additions & 4 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ include_directories(../include)
aux_source_directory(core LIB_SRC_FILES)

if(CRYPTO_CUSTOM)
aux_source_directory(CRYPTO_CUSTOM_PATH CRYPTO_FILES)
aux_source_directory(${CRYPTO_CUSTOM_PATH} CRYPTO_FILES)
list(APPEND LIB_SRC_FILES ${CRYPTO_FILES})
else()
aux_source_directory(crypto/custom_stub CRYPTO_FILES)
Expand Down Expand Up @@ -53,7 +53,7 @@ endif()

if(KEY_CUSTOM)
# Assumes CryptoLib is a Git submodule to project and custom directories and definitions exist at top level
aux_source_directory(KEY_CUSTOM_PATH KEY_CUSTOM_FILES)
aux_source_directory(${KEY_CUSTOM_PATH} KEY_CUSTOM_FILES)
list(APPEND LIB_SRC_FILES ${KEY_CUSTOM_FILES})
else()
aux_source_directory(key/custom_stub KEY_CUSTOM_FILES)
Expand All @@ -78,7 +78,7 @@ endif()

if(MC_CUSTOM)
# Assumes CryptoLib is a Git submodule to project and custom directories and definitions exist at top level
aux_source_directory(MC_CUSTOM_PATH MC_CUSTOM_FILES)
aux_source_directory(${MC_CUSTOM_PATH} MC_CUSTOM_FILES)
list(APPEND LIB_SRC_FILES ${MC_CUSTOM_FILES})
else()
aux_source_directory(mc/custom_stub MC_CUSTOM_FILES)
Expand All @@ -103,7 +103,7 @@ endif()

if(SA_CUSTOM)
# Assumes CryptoLib is a Git submodule to project and custom directories and definitions exist at top level
aux_source_directory(SA_CUSTOM_PATH SA_CUSTOM_FILES)
aux_source_directory(${SA_CUSTOM_PATH} SA_CUSTOM_FILES)
list(APPEND LIB_SRC_FILES ${SA_CUSTOM_FILES})
else()
aux_source_directory(sa/custom_stub SA_CUSTOM_FILES)
Expand Down
Loading