2022-05-06 09:49:46 +00:00
|
|
|
include_guard(GLOBAL)
|
|
|
|
|
|
|
|
|
2021-12-09 14:55:30 +00:00
|
|
|
include(ExternalProject)
|
|
|
|
|
|
|
|
if(CMAKE_BUILD_TYPE)
|
|
|
|
list(APPEND MYX_CMAKE_EXTERNAL_PROJECT_ARGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE})
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(MYX_CMAKE_DIR)
|
|
|
|
list(APPEND MYX_CMAKE_EXTERNAL_PROJECT_ARGS -DMYX_CMAKE_MAIN_DIR=${MYX_CMAKE_DIR})
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(CMAKE_C_COMPILER)
|
|
|
|
list(APPEND MYX_CMAKE_EXTERNAL_PROJECT_ARGS -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER})
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(CMAKE_C_FLAGS)
|
|
|
|
list(APPEND MYX_CMAKE_EXTERNAL_PROJECT_ARGS -E env "CFLAGS=${CMAKE_C_FLAGS}")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(CMAKE_CPP_COMPILER)
|
|
|
|
list(APPEND MYX_CMAKE_EXTERNAL_PROJECT_ARGS -DCMAKE_CPP_COMPILER=${CMAKE_CPP_COMPILER})
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(CMAKE_CXX_FLAGS)
|
|
|
|
list(APPEND MYX_CMAKE_EXTERNAL_PROJECT_ARGS -E env "CXXFLAGS=${CMAKE_CXX_FLAGS}")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(CMAKE_Fortran_COMPILER)
|
|
|
|
list(APPEND MYX_CMAKE_EXTERNAL_PROJECT_ARGS -DCMAKE_Fortran_COMPILER=${CMAKE_Fortran_COMPILER})
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(CMAKE_Fortran_FLAGS)
|
|
|
|
list(APPEND MYX_CMAKE_EXTERNAL_PROJECT_ARGS -E env "FFLAGS=${CMAKE_Fortran_FLAGS}")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(CMAKE_INSTALL_PREFIX)
|
|
|
|
list(APPEND MYX_CMAKE_EXTERNAL_PROJECT_ARGS -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR})
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(CMAKE_PREFIX_PATH)
|
|
|
|
list(APPEND MYX_CMAKE_EXTERNAL_PROJECT_ARGS -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH})
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(Qt5_DIR)
|
|
|
|
list(APPEND MYX_CMAKE_EXTERNAL_PROJECT_ARGS -DQt5_DIR=${Qt5_DIR})
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(Qt5Core_DIR)
|
|
|
|
list(APPEND MYX_CMAKE_EXTERNAL_PROJECT_ARGS -DQt5Core_DIR=${Qt5Core_DIR})
|
|
|
|
endif()
|