diff options
author | Stephen Kelly <steveire@gmail.com> | 2013-10-12 14:42:27 +0200 |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2013-10-12 14:42:27 +0200 |
commit | cd26fc3f88bcb96d5fc0ab10c13127870bc47c3f (patch) | |
tree | d0ff9941b030dfe44e5da6066b73a8c456fa26bb /find-modules | |
parent | b6ddac117f6e0d3e4a88ddaf8fbb769756f367ca (diff) | |
download | extra-cmake-modules-cd26fc3f88bcb96d5fc0ab10c13127870bc47c3f.tar.gz extra-cmake-modules-cd26fc3f88bcb96d5fc0ab10c13127870bc47c3f.tar.bz2 |
Simplify the method of finding only common-origin packages.
There is no need for the package to tell us its install dir.
Diffstat (limited to 'find-modules')
-rw-r--r-- | find-modules/FindKF5.cmake | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/find-modules/FindKF5.cmake b/find-modules/FindKF5.cmake index 0841c97a..8f954699 100644 --- a/find-modules/FindKF5.cmake +++ b/find-modules/FindKF5.cmake @@ -187,30 +187,21 @@ if(firstComponent) set(KF5_File "${${firstComponent}_CONFIG}}") if(${firstComponent}_CONFIG) - if(NOT DEFINED ${firstComponent}_INSTALL_PREFIX) - message(STATUS "${firstComponent} does not set ${firstComponent}_INSTALL_PREFIX !") - endif() - _kf5_handle_component(${firstComponent}) endif() # search for the other components first in the same directory where the first one # has been found, and additionally in KDEDIRS. This is to make sure we don't # get a random mix of installed KDE libraries. - set(CMAKE_PREFIX_PATH ${${firstComponent}_INSTALL_PREFIX} ${_KDEDIRS}) + get_filename_component(packages_dir "${${firstComponent}_DIR}/.." ABSOLUTE) foreach(comp ${followingComponents}) find_package(${comp} ${KF5_FIND_VERSION} CONFIG - NO_CMAKE_ENVIRONMENT_PATH - NO_SYSTEM_ENVIRONMENT_PATH - NO_CMAKE_BUILDS_PATH - NO_CMAKE_PACKAGE_REGISTRY - NO_CMAKE_SYSTEM_PATH - NO_CMAKE_SYSTEM_PACKAGE_REGISTRY - ) + PATHS "${packages_dir}" + NO_DEFAULT_PATH + ) if(${comp}_CONFIG) _kf5_handle_component(${comp}) - endif() endforeach() |