2018-10-24 13:20:27 +00:00
|
|
|
@PACKAGE_INIT@
|
|
|
|
|
2019-06-14 10:59:07 +00:00
|
|
|
# Slightly amended version of ./src/corelib/Qt6Config.cmake.in
|
2018-10-24 13:20:27 +00:00
|
|
|
if (CMAKE_VERSION VERSION_LESS 3.1.0)
|
|
|
|
message(FATAL_ERROR "Qt requires at least CMake version 3.1.0")
|
|
|
|
endif()
|
|
|
|
|
2019-02-11 10:34:35 +00:00
|
|
|
get_filename_component(_qt_cmake_dir "${CMAKE_CURRENT_LIST_DIR}/.." ABSOLUTE)
|
2019-09-19 11:46:37 +00:00
|
|
|
set(_qt_@PROJECT_VERSION_MAJOR@_config_cmake_dir "${CMAKE_CURRENT_LIST_DIR}")
|
2018-10-24 13:20:27 +00:00
|
|
|
|
2019-06-04 15:08:47 +00:00
|
|
|
if (NOT QT_NO_CREATE_TARGETS)
|
|
|
|
include("${CMAKE_CURRENT_LIST_DIR}/@INSTALL_CMAKE_NAMESPACE@Targets.cmake")
|
2019-12-05 12:54:07 +00:00
|
|
|
if(NOT QT_NO_CREATE_VERSIONLESS_TARGETS)
|
|
|
|
include("${CMAKE_CURRENT_LIST_DIR}/@INSTALL_CMAKE_NAMESPACE@VersionlessTargets.cmake")
|
|
|
|
endif()
|
2019-06-04 15:08:47 +00:00
|
|
|
else()
|
|
|
|
# For examples using `find_package(...)` inside their CMakeLists.txt files:
|
|
|
|
# Make CMake's AUTOGEN detect this Qt version properly
|
|
|
|
set_directory_properties(PROPERTIES
|
|
|
|
QT_VERSION_MAJOR @PROJECT_VERSION_MAJOR@
|
2019-12-11 15:14:22 +00:00
|
|
|
QT_VERSION_MINOR @PROJECT_VERSION_MINOR@
|
|
|
|
QT_VERSION_PATCH @PROJECT_VERSION_PATCH@)
|
2019-06-04 15:08:47 +00:00
|
|
|
endif()
|
2019-05-03 10:30:09 +00:00
|
|
|
|
2019-02-11 10:34:35 +00:00
|
|
|
# if (NOT @INSTALL_CMAKE_NAMESPACE@_FIND_COMPONENTS)
|
|
|
|
# set(@INSTALL_CMAKE_NAMESPACE@_NOT_FOUND_MESSAGE "The Qt package requires at least one component")
|
|
|
|
# set(@INSTALL_CMAKE_NAMESPACE@_FOUND False)
|
2018-10-24 13:20:27 +00:00
|
|
|
# return()
|
|
|
|
# endif()
|
|
|
|
|
2019-09-30 11:22:15 +00:00
|
|
|
get_filename_component(_qt_import_prefix "${CMAKE_CURRENT_LIST_FILE}" PATH)
|
|
|
|
get_filename_component(_qt_import_prefix "${_qt_import_prefix}" REALPATH)
|
|
|
|
list(APPEND CMAKE_MODULE_PATH "${_qt_import_prefix}")
|
|
|
|
list(APPEND CMAKE_MODULE_PATH "${_qt_import_prefix}/3rdparty/extra-cmake-modules/find-modules")
|
|
|
|
list(APPEND CMAKE_MODULE_PATH "${_qt_import_prefix}/3rdparty/kwin")
|
|
|
|
|
2019-02-11 10:34:35 +00:00
|
|
|
foreach(module ${@INSTALL_CMAKE_NAMESPACE@_FIND_COMPONENTS})
|
|
|
|
find_package(@INSTALL_CMAKE_NAMESPACE@${module}
|
|
|
|
${_@INSTALL_CMAKE_NAMESPACE@_FIND_PARTS_QUIET}
|
|
|
|
${_@INSTALL_CMAKE_NAMESPACE@_FIND_PARTS_REQUIRED}
|
2019-09-19 11:46:37 +00:00
|
|
|
PATHS ${_qt_cmake_dir} ${QT_EXAMPLES_CMAKE_PREFIX_PATH} NO_DEFAULT_PATH
|
2018-10-24 13:20:27 +00:00
|
|
|
)
|
2019-02-11 10:34:35 +00:00
|
|
|
if (NOT @INSTALL_CMAKE_NAMESPACE@${module}_FOUND)
|
2018-10-24 13:20:27 +00:00
|
|
|
string(CONFIGURE ${_qt5_module_location_template} _expected_module_location @ONLY)
|
|
|
|
|
2019-02-11 10:34:35 +00:00
|
|
|
if (@INSTALL_CMAKE_NAMESPACE@_FIND_REQUIRED_${module})
|
2018-10-24 13:20:27 +00:00
|
|
|
set(_Qt_NOTFOUND_MESSAGE "${_Qt_NOTFOUND_MESSAGE}Failed to find Qt component \"${module}\" config file at \"${_expected_module_location}\"\n")
|
2019-06-03 18:47:37 +00:00
|
|
|
elseif(NOT @INSTALL_CMAKE_NAMESPACE@_FIND_QUIETLY)
|
2018-10-24 13:20:27 +00:00
|
|
|
message(WARNING "Failed to find Qt component \"${module}\" config file at \"${_expected_module_location}\"")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
unset(_expected_module_location)
|
|
|
|
endif()
|
|
|
|
endforeach()
|
|
|
|
|
|
|
|
if (_Qt_NOTFOUND_MESSAGE)
|
2019-02-11 10:34:35 +00:00
|
|
|
set(@INSTALL_CMAKE_NAMESPACE@_NOT_FOUND_MESSAGE "${_Qt_NOTFOUND_MESSAGE}")
|
|
|
|
set(@INSTALL_CMAKE_NAMESPACE@_FOUND False)
|
2018-10-24 13:20:27 +00:00
|
|
|
endif()
|