diff options
Diffstat (limited to 'src/corelib/Qt5Config.cmake.in')
-rw-r--r-- | src/corelib/Qt5Config.cmake.in | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/corelib/Qt5Config.cmake.in b/src/corelib/Qt5Config.cmake.in index a872d0e917..75b53485b7 100644 --- a/src/corelib/Qt5Config.cmake.in +++ b/src/corelib/Qt5Config.cmake.in @@ -22,18 +22,24 @@ get_filename_component(_qt5_install_prefix \"${CMAKE_CURRENT_LIST_DIR}/..\" ABSO 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_install_prefix}\" NO_DEFAULT_PATH + 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 \\\"${_qt5_install_prefix}/Qt5${module}/Qt5${module}Config.cmake\\\"\\n\") + 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 \\\"${_qt5_install_prefix}/Qt5${module}/Qt5${module}Config.cmake\\\"\") + message(WARNING \"Failed to find Qt5 component \\\"${module}\\\" config file at \\\"${_expected_module_location}\\\"\") endif() + + unset(_expected_module_location) endif() endforeach() |