From b8cd54a92ff63b0eb063ba1282014a64d383563b Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Wed, 10 Apr 2013 17:49:24 +0200 Subject: [PATCH] Make the umbrella Qt5 CMake Config file find components only in the parent directory. Similar to 70420ec3 (Look for cmake package dependents only in the parent directory., 2013-04-02), make sure cmake only searches for sibling packages as components. Change-Id: I9e0c13dfcdba28a9fd6892828b0f509dd63e6604 Reviewed-by: Brad King Reviewed-by: Alexander Neundorf Reviewed-by: Stephen Kelly --- src/corelib/Qt5Config.cmake.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/corelib/Qt5Config.cmake.in b/src/corelib/Qt5Config.cmake.in index 408dd64496..a7e9a042e8 100644 --- a/src/corelib/Qt5Config.cmake.in +++ b/src/corelib/Qt5Config.cmake.in @@ -18,7 +18,7 @@ if (Qt5_FIND_QUIETLY) set(_Qt5_FIND_PARTS_QUIET QUIET) endif() -get_filename_component(_qt5_install_prefix \"${CMAKE_CURRENT_LIST_DIR}/$${CMAKE_RELATIVE_INSTALL_DIR}\" ABSOLUTE) +get_filename_component(_qt5_install_prefix \"${CMAKE_CURRENT_LIST_DIR}/..\" ABSOLUTE) set(_Qt5_NOTFOUND_MESSAGE) @@ -30,9 +30,9 @@ foreach(module ${Qt5_FIND_COMPONENTS}) ) if (NOT Qt5${module}_FOUND) if (Qt5_FIND_REQUIRED_${module}) - set(_Qt5_NOTFOUND_MESSAGE \"${_Qt5_NOTFOUND_MESSAGE}Failed to find Qt5 component \\\"${module}\\\" config file at \\\"${_qt5_install_prefix}/lib/cmake/Qt5${module}/Qt5${module}Config.cmake\\\"\\n\") + 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\") elseif(NOT Qt5_FIND_QUIETLY) - message(WARNING \"Failed to find Qt5 component \\\"${module}\\\" config file at \\\"${_qt5_install_prefix}/lib/cmake/Qt5${module}/Qt5${module}Config.cmake\\\"\") + message(WARNING \"Failed to find Qt5 component \\\"${module}\\\" config file at \\\"${_qt5_install_prefix}/Qt5${module}/Qt5${module}Config.cmake\\\"\") endif() endif() endforeach()