diff options
author | Stephen Kelly <stephen.kelly@kdab.com> | 2012-05-13 19:52:13 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-05-14 04:35:01 +0200 |
commit | c18a41197f5df3d66dccf86c176e5dd6fd01b163 (patch) | |
tree | d45229cd4a56deea7020c1d79797450ef7d71aa6 /src | |
parent | dd38ad600ff85f40dd33499f24c5b88541e2acf2 (diff) |
Find Qt5 modules automatically in the qt5_use_modules function.
This ensures that we only find Qt5 modules from the same directory
as modules we have already found, not from multiple different
directories which may be incompatible.
Change-Id: I7ad1d81ec41bba2e543130740041338ba44a6c3b
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/Qt5CoreMacros.cmake | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/corelib/Qt5CoreMacros.cmake b/src/corelib/Qt5CoreMacros.cmake index 41748b52ec..bc4c020826 100644 --- a/src/corelib/Qt5CoreMacros.cmake +++ b/src/corelib/Qt5CoreMacros.cmake @@ -214,7 +214,10 @@ if (NOT CMAKE_VERSION VERSION_LESS 2.8.8) endif() foreach(_module ${modules}) if (NOT Qt5${_module}_FOUND) - message(FATAL_ERROR "Can not use \"${_module}\" module which has not yet been found.") + find_package(Qt5${_module} PATHS ${_qt5_corelib_install_prefix} NO_DEFAULT_PATH) + if (NOT Qt5${_module}_FOUND) + message(FATAL_ERROR "Can not use \"${_module}\" module which has not yet been found.") + endif() endif() target_link_libraries(${_target} ${link_type} ${Qt5${_module}_LIBRARIES}) set_property(TARGET ${_target} APPEND PROPERTY INCLUDE_DIRECTORIES ${Qt5${_module}_INCLUDE_DIRS}) |