summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-05-15 14:54:45 (GMT)
committerKitware Robot <kwrobot@kitware.com>2017-05-15 14:55:10 (GMT)
commitcda0baea495056c12c97262701c832e9b2a62bb4 (patch)
treed2c7518c0fc95debfc822dce24ed0cfd925c1f14 /Modules
parent52fbae0a59d05f2724e77aff75c7761b685bae03 (diff)
parent2e293c39da969cc0c39503e1fef6310b4ef85d85 (diff)
downloadCMake-cda0baea495056c12c97262701c832e9b2a62bb4.zip
CMake-cda0baea495056c12c97262701c832e9b2a62bb4.tar.gz
CMake-cda0baea495056c12c97262701c832e9b2a62bb4.tar.bz2
Merge topic 'FindPkgConfig-fix-lib-search'
2e293c39 FindPkgConfig: Fix pkg_check_modules() non-standard location search Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !835
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindPkgConfig.cmake4
1 files changed, 3 insertions, 1 deletions
diff --git a/Modules/FindPkgConfig.cmake b/Modules/FindPkgConfig.cmake
index 54572f0..12a5ded 100644
--- a/Modules/FindPkgConfig.cmake
+++ b/Modules/FindPkgConfig.cmake
@@ -190,10 +190,12 @@ function(_pkg_create_imp_target _prefix _no_cmake_path _no_cmake_environment_pat
string(APPEND _find_opts " NO_CMAKE_ENVIRONMENT_PATH")
endif()
+ unset(_search_paths)
foreach (flag IN LISTS ${_prefix}_LDFLAGS)
if (flag MATCHES "^-L(.*)")
# only look into the given paths from now on
- set(_find_opts HINTS ${CMAKE_MATCH_1} NO_DEFAULT_PATH)
+ list(APPEND _search_paths ${CMAKE_MATCH_1})
+ set(_find_opts HINTS ${_search_paths} NO_DEFAULT_PATH)
continue()
endif()
if (flag MATCHES "^-l(.*)")