2022-09-28 22:48:13 +00:00
|
|
|
cmake_policy(PUSH)
|
|
|
|
cmake_policy(SET CMP0057 NEW) # IN_LIST operator
|
|
|
|
|
|
|
|
get_filename_component(MYX_CMAKE_SOURCE_DIR "${CMAKE_CURRENT_LIST_FILE}" DIRECTORY)
|
|
|
|
get_filename_component(PROJECT_CMAKE_DIR ${MYX_CMAKE_SOURCE_DIR} DIRECTORY)
|
|
|
|
|
|
|
|
if(NOT MYX_CMAKE_SOURCE_DIR STREQUAL "${PROJECT_SOURCE_DIR}/cmake/myx")
|
|
|
|
message(FATAL_ERROR "MyxCMake library should be placed in ${PROJECT_SOURCE_DIR}/cmake/myx directory")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
set(MYX_CMAKE_BACKPORTS_DIR "${MYX_CMAKE_SOURCE_DIR}/backports")
|
|
|
|
set(MYX_CMAKE_LIB_DIR "${MYX_CMAKE_SOURCE_DIR}/lib")
|
|
|
|
|
|
|
|
include(${MYX_CMAKE_BACKPORTS_DIR}/IncludeGuard.cmake)
|
|
|
|
include(${MYX_CMAKE_BACKPORTS_DIR}/TopLevelProject.cmake)
|
|
|
|
if(${CMAKE_VERSION} VERSION_LESS "3.11.0")
|
|
|
|
include(${MYX_CMAKE_BACKPORTS_DIR}/FetchContent.cmake)
|
|
|
|
endif()
|
|
|
|
|
2022-09-28 23:46:29 +00:00
|
|
|
include(${MYX_CMAKE_LIB_DIR}/ColoredMessages.cmake)
|
|
|
|
include(${MYX_CMAKE_LIB_DIR}/NinjaGeneratorWarning.cmake)
|
|
|
|
include(${MYX_CMAKE_LIB_DIR}/DirectoriesGuards.cmake)
|
|
|
|
include(${MYX_CMAKE_LIB_DIR}/SemanticProjectVersion.cmake)
|
|
|
|
include(${MYX_CMAKE_LIB_DIR}/NinjaGeneratorWrapper.cmake)
|
|
|
|
|
2022-09-28 22:48:13 +00:00
|
|
|
cmake_policy(POP)
|