From 61898de64180ce8123219f5e6450cb8375840045 Mon Sep 17 00:00:00 2001 From: Florent Castelli Date: Fri, 4 Nov 2016 23:35:27 +0100 Subject: [PATCH] PkgConfig: Fix FindPkgConfig imported target feature The options to the find_library call to create the imported target used a literal string "HINTS /path NO_DEFAULT_PATH" instead of a list of options. This resulted in never finding any library in my testing. --- Modules/FindPkgConfig.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/FindPkgConfig.cmake b/Modules/FindPkgConfig.cmake index 072a27adc..3f75b19e8 100644 --- a/Modules/FindPkgConfig.cmake +++ b/Modules/FindPkgConfig.cmake @@ -193,7 +193,7 @@ function(_pkg_create_imp_target _prefix _no_cmake_path _no_cmake_environment_pat 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") + set(_find_opts HINTS ${CMAKE_MATCH_1} NO_DEFAULT_PATH) continue() endif() if (flag MATCHES "^-l(.*)")