summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorStephen Kelly <stephen.kelly@kdab.com>2013-04-10 17:28:27 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-04-11 00:51:04 +0200
commit1b32185a7a4d55c68d8accfa9b463dbe0d4bef57 (patch)
tree986c2e5a3c8da872190c3be408e255df9a1ec267 /src/corelib
parentb8cd54a92ff63b0eb063ba1282014a64d383563b (diff)
Make qt5_use_modules find dependents only in the parent directory.
Similar to 70420ec3 (Look for cmake package dependents only in the parent directory., 2013-04-02), make sure this cmake function only searches for sibling packages as dependencies. Change-Id: Icab23d333fa6a750ee262b592fae39f0ba334fee Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/Qt5CoreMacros.cmake3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/corelib/Qt5CoreMacros.cmake b/src/corelib/Qt5CoreMacros.cmake
index e3115db8ee..b6124b40cd 100644
--- a/src/corelib/Qt5CoreMacros.cmake
+++ b/src/corelib/Qt5CoreMacros.cmake
@@ -215,6 +215,7 @@ function(QT5_ADD_RESOURCES outfiles )
set(${outfiles} ${${outfiles}} PARENT_SCOPE)
endfunction()
+set(_Qt5_COMPONENT_PATH "${CMAKE_CURRENT_LIST_DIR}/..")
if (NOT CMAKE_VERSION VERSION_LESS 2.8.9)
macro(qt5_use_modules _target _link_type)
@@ -234,7 +235,7 @@ if (NOT CMAKE_VERSION VERSION_LESS 2.8.9)
foreach(_module ${_qt5_modules})
if (NOT Qt5${_module}_FOUND)
- find_package(Qt5${_module} PATHS ${_qt5Core_install_prefix} NO_DEFAULT_PATH)
+ find_package(Qt5${_module} PATHS "${_Qt5_COMPONENT_PATH}" NO_DEFAULT_PATH)
if (NOT Qt5${_module}_FOUND)
message(FATAL_ERROR "Can not use \"${_module}\" module which has not yet been found.")
endif()