summaryrefslogtreecommitdiffstats
path: root/src/corelib/Qt6Config.cmake.in
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2019-06-14 12:59:07 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2019-06-14 16:31:09 +0200
commitfe3bd212fc85b6c3a64bb8bd5beca4ff4d3493a1 (patch)
treeb96dd84abfb6ac25b26539999bf2d7d427f347dd /src/corelib/Qt6Config.cmake.in
parent72066a3a585b4f4fed499c64464ca5ad2ba9f71d (diff)
parentae97d11589dd03edeea0475163e6110869143b35 (diff)
Merge remote-tracking branch 'origin/wip/qt6' into wip/cmake
This changes many different CMake places to mention Qt6 instead of Qt5. Note that some old qt5 cmake config files in corelib are probably not needed anymore, but I still renamed and kept them for now. Change-Id: Ie69e81540386a5af153f76c0242e18d48211bec4
Diffstat (limited to 'src/corelib/Qt6Config.cmake.in')
-rw-r--r--src/corelib/Qt6Config.cmake.in51
1 files changed, 51 insertions, 0 deletions
diff --git a/src/corelib/Qt6Config.cmake.in b/src/corelib/Qt6Config.cmake.in
new file mode 100644
index 0000000000..6b6544f932
--- /dev/null
+++ b/src/corelib/Qt6Config.cmake.in
@@ -0,0 +1,51 @@
+
+if (CMAKE_VERSION VERSION_LESS 3.1.0)
+ message(FATAL_ERROR \"Qt5 requires at least CMake version 3.1.0\")
+endif()
+
+if (NOT Qt5_FIND_COMPONENTS)
+ set(Qt5_NOT_FOUND_MESSAGE \"The Qt5 package requires at least one component\")
+ set(Qt5_FOUND False)
+ return()
+endif()
+
+set(_Qt5_FIND_PARTS_REQUIRED)
+if (Qt5_FIND_REQUIRED)
+ set(_Qt5_FIND_PARTS_REQUIRED REQUIRED)
+endif()
+set(_Qt5_FIND_PARTS_QUIET)
+if (Qt5_FIND_QUIETLY)
+ set(_Qt5_FIND_PARTS_QUIET QUIET)
+endif()
+
+get_filename_component(_qt5_install_prefix \"${CMAKE_CURRENT_LIST_DIR}/..\" ABSOLUTE)
+
+set(_Qt5_NOTFOUND_MESSAGE)
+
+include(${CMAKE_CURRENT_LIST_DIR}/Qt5ModuleLocation.cmake)
+
+foreach(module ${Qt5_FIND_COMPONENTS})
+ find_package(Qt5${module}
+ ${_Qt5_FIND_PARTS_QUIET}
+ ${_Qt5_FIND_PARTS_REQUIRED}
+ PATHS ${_qt5_module_paths} NO_DEFAULT_PATH
+ )
+ if (NOT Qt5${module}_FOUND)
+ string(CONFIGURE ${_qt5_module_location_template} _expected_module_location @ONLY)
+
+ if (Qt5_FIND_REQUIRED_${module})
+ set(_Qt5_NOTFOUND_MESSAGE \"${_Qt5_NOTFOUND_MESSAGE}Failed to find Qt5 component \\\"${module}\\\" config file at \\\"${_expected_module_location}\\\"\\n\")
+ elseif(NOT Qt5_FIND_QUIETLY)
+ message(WARNING \"Failed to find Qt5 component \\\"${module}\\\" config file at \\\"${_expected_module_location}\\\"\")
+ endif()
+
+ unset(_expected_module_location)
+ endif()
+endforeach()
+
+if (_Qt5_NOTFOUND_MESSAGE)
+ set(Qt5_NOT_FOUND_MESSAGE \"${_Qt5_NOTFOUND_MESSAGE}\")
+ set(Qt5_FOUND False)
+endif()
+
+_qt5_Core_check_file_exists(\"${CMAKE_CURRENT_LIST_DIR}/Qt5ConfigVersion.cmake\")