2018-10-24 13:20:27 +00:00
|
|
|
## QtPlatform Target:
|
2019-02-11 10:34:35 +00:00
|
|
|
add_library(Platform INTERFACE)
|
|
|
|
add_library(Qt::Platform ALIAS Platform)
|
|
|
|
target_include_directories(Platform
|
2018-10-24 13:20:27 +00:00
|
|
|
INTERFACE
|
|
|
|
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/${QT_PLATFORM_DEFINITION_DIR}>
|
|
|
|
$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include>
|
|
|
|
$<INSTALL_INTERFACE:${INSTALL_DATADIR}/${QT_PLATFORM_DEFINITION_DIR}>
|
|
|
|
$<INSTALL_INTERFACE:${INSTALL_INCLUDEDIR}>
|
|
|
|
)
|
2019-02-11 10:34:35 +00:00
|
|
|
target_compile_definitions(Platform INTERFACE ${QT_PLATFORM_DEFINITIONS})
|
|
|
|
set(config_install_dir "${INSTALL_LIBDIR}/cmake/${INSTALL_CMAKE_NAMESPACE}")
|
2018-10-24 13:20:27 +00:00
|
|
|
|
|
|
|
configure_package_config_file(
|
|
|
|
"${PROJECT_SOURCE_DIR}/cmake/QtConfig.cmake.in"
|
2019-02-11 10:34:35 +00:00
|
|
|
"${CMAKE_CURRENT_BINARY_DIR}/${INSTALL_CMAKE_NAMESPACE}Config.cmake"
|
2018-10-24 13:20:27 +00:00
|
|
|
INSTALL_DESTINATION "${config_install_dir}"
|
|
|
|
)
|
|
|
|
write_basic_package_version_file(
|
2019-02-11 10:34:35 +00:00
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/${INSTALL_CMAKE_NAMESPACE}ConfigVersion.cmake
|
2018-10-24 13:20:27 +00:00
|
|
|
VERSION ${PROJECT_VERSION}
|
|
|
|
COMPATIBILITY AnyNewerVersion
|
|
|
|
)
|
|
|
|
install(FILES
|
2019-02-11 10:34:35 +00:00
|
|
|
"${CMAKE_CURRENT_BINARY_DIR}/${INSTALL_CMAKE_NAMESPACE}Config.cmake"
|
|
|
|
"${CMAKE_CURRENT_BINARY_DIR}/${INSTALL_CMAKE_NAMESPACE}ConfigVersion.cmake"
|
2018-10-24 13:20:27 +00:00
|
|
|
DESTINATION "${config_install_dir}"
|
|
|
|
COMPONENT Devel
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
## Library to hold global features:
|
2019-01-10 09:50:38 +00:00
|
|
|
## These features are stored and accessed via Qt::GlobalConfig, but the
|
|
|
|
## files always lived in Qt::Core, so we keep it that way
|
|
|
|
add_library(GlobalConfig INTERFACE)
|
|
|
|
target_include_directories(GlobalConfig INTERFACE
|
|
|
|
$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include>
|
|
|
|
$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include/QtCore>
|
|
|
|
$<INSTALL_INTERFACE:include>
|
|
|
|
$<INSTALL_INTERFACE:include/QtCore>
|
|
|
|
)
|
2019-03-21 12:12:46 +00:00
|
|
|
qt_feature_module_begin(LIBRARY GlobalConfig
|
2018-10-24 13:20:27 +00:00
|
|
|
PUBLIC_FILE src/corelib/global/qconfig.h
|
|
|
|
PRIVATE_FILE src/corelib/global/qconfig_p.h
|
|
|
|
)
|
|
|
|
include("${CMAKE_CURRENT_SOURCE_DIR}/configure.cmake")
|
2019-01-10 09:50:38 +00:00
|
|
|
qt_feature_module_end(GlobalConfig)
|
2018-10-24 13:20:27 +00:00
|
|
|
|
2019-01-10 09:50:38 +00:00
|
|
|
add_library(Qt::GlobalConfig ALIAS GlobalConfig)
|
|
|
|
|
|
|
|
add_library(GlobalConfigPrivate INTERFACE)
|
|
|
|
target_link_libraries(GlobalConfigPrivate INTERFACE GlobalConfig)
|
|
|
|
target_include_directories(GlobalConfigPrivate INTERFACE
|
|
|
|
$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include/QtCore/${PROJECT_VERSION}>
|
|
|
|
$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include/QtCore/${PROJECT_VERSION}/QtCore>
|
|
|
|
$<INSTALL_INTERFACE:include/QtCore/${PROJECT_VERSION}>
|
|
|
|
$<INSTALL_INTERFACE:include/QtCore/${PROJECT_VERSION}/QtCore>
|
|
|
|
)
|
|
|
|
add_library(Qt::GlobalConfigPrivate ALIAS GlobalConfigPrivate)
|
|
|
|
|
2019-02-11 10:34:35 +00:00
|
|
|
install(TARGETS Platform GlobalConfig GlobalConfigPrivate EXPORT "${INSTALL_CMAKE_NAMESPACE}Targets")
|
2019-02-12 09:02:15 +00:00
|
|
|
install(EXPORT "${INSTALL_CMAKE_NAMESPACE}Targets" NAMESPACE ${INSTALL_CMAKE_EXPORT_NAMESPACE}:: DESTINATION "${config_install_dir}")
|
2018-10-24 13:20:27 +00:00
|
|
|
|
|
|
|
## Install some QtBase specific CMake files:
|
|
|
|
install(FILES
|
|
|
|
cmake/QtBuild.cmake
|
2019-02-19 16:37:30 +00:00
|
|
|
cmake/QtCompilerFlags.cmake
|
2019-02-13 08:45:57 +00:00
|
|
|
cmake/QtCompilerOptimization.cmake
|
2018-10-24 13:20:27 +00:00
|
|
|
cmake/QtFeature.cmake
|
2019-02-13 08:45:57 +00:00
|
|
|
cmake/QtPlatformSupport.cmake
|
2018-10-24 13:20:27 +00:00
|
|
|
cmake/QtPostProcess.cmake
|
|
|
|
cmake/QtSetup.cmake
|
|
|
|
cmake/QtModuleConfig.cmake.in
|
|
|
|
DESTINATION "${config_install_dir}"
|
|
|
|
)
|
2019-02-13 08:45:57 +00:00
|
|
|
# TODO: Check whether this is the right place to install these
|
|
|
|
install(DIRECTORY cmake/3rdparty
|
|
|
|
DESTINATION "${config_install_dir}"
|
|
|
|
)
|