2022-10-06 12:22:57 +00:00
|
|
|
cmake_policy(PUSH)
|
|
|
|
cmake_policy(SET CMP0057 NEW) # IN_LIST operator
|
|
|
|
|
|
|
|
# Каталог для модулей, выполняющих поиск библиотек
|
2022-10-07 12:02:38 +00:00
|
|
|
set(MYX_CMAKE_FIND_DIR "${PROJECT_SOURCE_DIR}/cmake/find")
|
|
|
|
if(IS_DIRECTORY "${MYX_CMAKE_FIND_DIR}")
|
|
|
|
if(NOT ${MYX_CMAKE_FIND_DIR} IN_LIST CMAKE_MODULE_PATH)
|
|
|
|
list(INSERT CMAKE_MODULE_PATH 0 "${MYX_CMAKE_FIND_DIR}")
|
|
|
|
endif()
|
|
|
|
endif()
|
2022-10-06 12:22:57 +00:00
|
|
|
|
|
|
|
get_filename_component(MYX_CMAKE_SOURCE_DIR "${CMAKE_CURRENT_LIST_FILE}" DIRECTORY)
|
|
|
|
|
|
|
|
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)
|
|
|
|
else()
|
|
|
|
include(FetchContent)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
include(GNUInstallDirs)
|
|
|
|
include(CMakeDependentOption)
|
|
|
|
|
|
|
|
include(${MYX_CMAKE_LIB_DIR}/macro/CreateSymlink.cmake)
|
|
|
|
include(${MYX_CMAKE_LIB_DIR}/macro/FindPackages.cmake)
|
|
|
|
include(${MYX_CMAKE_LIB_DIR}/macro/InstallRelative.cmake)
|
2022-10-07 12:02:38 +00:00
|
|
|
include(${MYX_CMAKE_LIB_DIR}/macro/CheckEnableCxxCompilerFlag.cmake)
|
2022-10-06 12:22:57 +00:00
|
|
|
|
2022-10-07 12:02:38 +00:00
|
|
|
include(${MYX_CMAKE_LIB_DIR}/ColoredMessages.cmake)
|
2022-10-06 12:22:57 +00:00
|
|
|
include(${MYX_CMAKE_LIB_DIR}/PopulateCMakeBinaryDir.cmake)
|
|
|
|
include(${MYX_CMAKE_LIB_DIR}/CurrentDate.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)
|
|
|
|
include(${MYX_CMAKE_LIB_DIR}/FetchContentAdd.cmake)
|
|
|
|
|
2022-10-07 12:02:38 +00:00
|
|
|
include(${MYX_CMAKE_LIB_DIR}/LSBInfo.cmake)
|
|
|
|
include(${MYX_CMAKE_LIB_DIR}/Toolchain.cmake)
|
|
|
|
include(${MYX_CMAKE_LIB_DIR}/CompilerFlags.cmake)
|
2022-10-06 12:22:57 +00:00
|
|
|
include(${MYX_CMAKE_LIB_DIR}/AddExecutable.cmake)
|
2022-10-20 09:53:06 +00:00
|
|
|
include(${MYX_CMAKE_LIB_DIR}/AddInterfaceLibrary.cmake)
|
|
|
|
include(${MYX_CMAKE_LIB_DIR}/AddObjectLibrary.cmake)
|
2022-10-06 12:22:57 +00:00
|
|
|
include(${MYX_CMAKE_LIB_DIR}/TargetSetup.cmake)
|
|
|
|
include(${MYX_CMAKE_LIB_DIR}/Qt5TargetSetup.cmake)
|
|
|
|
|
|
|
|
include(${MYX_CMAKE_LIB_DIR}/uncrustify/Uncrustify.cmake)
|
|
|
|
include(${MYX_CMAKE_LIB_DIR}/doc/Doxygen.cmake)
|
|
|
|
|
|
|
|
include(${MYX_CMAKE_LIB_DIR}/generators/PrivateConfigHeader.cmake)
|
|
|
|
include(${MYX_CMAKE_LIB_DIR}/generators/GitInfoHeader.cmake)
|
|
|
|
|
2022-10-20 09:53:06 +00:00
|
|
|
include(${MYX_CMAKE_LIB_DIR}/CreatePackages.cmake)
|
2022-10-07 12:02:38 +00:00
|
|
|
include(${MYX_CMAKE_LIB_DIR}/Uninstall.cmake)
|
|
|
|
|
2022-10-06 12:22:57 +00:00
|
|
|
unset(MYX_CMAKE_SOURCE_DIR)
|
|
|
|
unset(MYX_CMAKE_BACKPORTS_DIR)
|
|
|
|
unset(MYX_CMAKE_LIB_DIR)
|
|
|
|
|
|
|
|
cmake_policy(POP)
|