2020-08-03 12:16:10 +00:00
|
|
|
include(ExternalProject)
|
|
|
|
|
|
|
|
if(CMAKE_BUILD_TYPE)
|
|
|
|
list(APPEND CMLIB_EXT_PROJ_DEFAULT_ARGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE})
|
|
|
|
endif()
|
|
|
|
|
2021-07-03 06:28:32 +00:00
|
|
|
if(CMLIB_MAIN_DIR)
|
|
|
|
list(APPEND CMLIB_EXT_PROJ_DEFAULT_ARGS -DCMLIB_MAIN_DIR=${CMLIB_MAIN_DIR})
|
|
|
|
endif()
|
|
|
|
|
2020-08-03 12:16:10 +00:00
|
|
|
if(CMAKE_C_COMPILER)
|
|
|
|
list(APPEND CMLIB_EXT_PROJ_DEFAULT_ARGS -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER})
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(CMAKE_C_FLAGS)
|
|
|
|
list(APPEND CMLIB_EXT_PROJ_DEFAULT_ARGS -E env "CFLAGS=${CMAKE_C_FLAGS}")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(CMAKE_CPP_COMPILER)
|
|
|
|
list(APPEND CMLIB_EXT_PROJ_DEFAULT_ARGS -DCMAKE_CPP_COMPILER=${CMAKE_CPP_COMPILER})
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(CMAKE_CXX_FLAGS)
|
|
|
|
list(APPEND CMLIB_EXT_PROJ_DEFAULT_ARGS -E env "CXXFLAGS=${CMAKE_CXX_FLAGS}")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(CMAKE_Fortran_COMPILER)
|
|
|
|
list(APPEND CMLIB_EXT_PROJ_DEFAULT_ARGS -DCMAKE_Fortran_COMPILER=${CMAKE_Fortran_COMPILER})
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(CMAKE_Fortran_FLAGS)
|
|
|
|
list(APPEND CMLIB_EXT_PROJ_DEFAULT_ARGS -E env "FFLAGS=${CMAKE_Fortran_FLAGS}")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(CMAKE_INSTALL_PREFIX)
|
|
|
|
list(APPEND CMLIB_EXT_PROJ_DEFAULT_ARGS -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR})
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(CMAKE_PREFIX_PATH)
|
|
|
|
list(APPEND CMLIB_EXT_PROJ_DEFAULT_ARGS -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH})
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(Qt5_DIR)
|
|
|
|
list(APPEND CMLIB_EXT_PROJ_DEFAULT_ARGS -DQt5_DIR=${Qt5_DIR})
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(Qt5Core_DIR)
|
|
|
|
list(APPEND CMLIB_EXT_PROJ_DEFAULT_ARGS -DQt5Core_DIR=${Qt5Core_DIR})
|
|
|
|
endif()
|