forked from lthn/blockchain
Refactor Conan profile setup to simplify CONAN_HOME assignment and remove Windows-specific runtime settings
This commit is contained in:
parent
c1f3b2e773
commit
2c9ebb4a9e
1 changed files with 7 additions and 13 deletions
|
|
@ -1,14 +1,8 @@
|
|||
# Use the CONAN_HOME from the environment, or default to a local directory.
|
||||
if(NOT DEFINED ENV{CONAN_HOME})
|
||||
set(CONAN_HOME "${CMAKE_SOURCE_DIR}/build/sdk")
|
||||
message(STATUS "CONAN_HOME not set, defaulting to: ${CONAN_HOME}")
|
||||
else()
|
||||
set(CONAN_HOME "$ENV{CONAN_HOME}")
|
||||
endif()
|
||||
|
||||
set(CONAN_HOME "${CMAKE_SOURCE_DIR}/build/sdk")
|
||||
set(DEFAULT_PROFILE "${CONAN_HOME}/profiles/default")
|
||||
|
||||
|
||||
if(NOT EXISTS "${DEFAULT_PROFILE}")
|
||||
message(STATUS "Conan default profile not found. Detecting a new one...")
|
||||
set(ENV{CONAN_HOME} "${CONAN_HOME}")
|
||||
|
|
@ -30,12 +24,12 @@ set(CUSTOM_SETTINGS "
|
|||
compiler.cppstd=17
|
||||
")
|
||||
|
||||
if(WIN32)
|
||||
message(STATUS "Windows detected. Appending static runtime setting.")
|
||||
string(APPEND CUSTOM_SETTINGS "
|
||||
compiler.runtime=static
|
||||
")
|
||||
endif()
|
||||
#if(WIN32)
|
||||
# message(STATUS "Windows detected. Appending static runtime setting.")
|
||||
# string(APPEND CUSTOM_SETTINGS "
|
||||
#compiler.runtime=static
|
||||
#")
|
||||
#endif()
|
||||
|
||||
file(APPEND "${DEFAULT_PROFILE}" "${CUSTOM_SETTINGS}")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue