Skip to content

Commit

Permalink
#249 fixed custom path variable use in CMakeLists.txt and src/CMakeLi…
Browse files Browse the repository at this point in the history
…sts.txt
  • Loading branch information
williamposey committed Jun 4, 2024
1 parent 277a3fd commit 9db3e54
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
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

0 comments on commit 9db3e54

Please sign in to comment.