From 40b95ee8e6ee57ee87b791e831ac3508f77db9a4 Mon Sep 17 00:00:00 2001 From: Craig Scott Date: Sat, 16 Dec 2017 21:49:10 +1100 Subject: FindPkgConfig: Fix IMPORTED_TARGET NO...PATH option handling --- Modules/FindPkgConfig.cmake | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Modules/FindPkgConfig.cmake b/Modules/FindPkgConfig.cmake index aad3b74..952ca92 100644 --- a/Modules/FindPkgConfig.cmake +++ b/Modules/FindPkgConfig.cmake @@ -191,10 +191,10 @@ function(_pkg_create_imp_target _prefix _no_cmake_path _no_cmake_environment_pat # set the options that are used as long as the .pc file does not provide a library # path to look into if(_no_cmake_path) - set(_find_opts "NO_CMAKE_PATH") + list(APPEND _find_opts "NO_CMAKE_PATH") endif() if(_no_cmake_environment_path) - string(APPEND _find_opts " NO_CMAKE_ENVIRONMENT_PATH") + list(APPEND _find_opts "NO_CMAKE_ENVIRONMENT_PATH") endif() unset(_search_paths) @@ -458,7 +458,7 @@ macro(_pkg_check_modules_internal _is_required _is_silent _no_cmake_path _no_cma _pkgconfig_invoke_dyn("${_pkg_check_modules_packages}" "${_prefix}" CFLAGS_OTHER "" --cflags-only-other ) if (_imp_target) - _pkg_create_imp_target("${_prefix}" _no_cmake_path _no_cmake_environment_path) + _pkg_create_imp_target("${_prefix}" ${_no_cmake_path} ${_no_cmake_environment_path}) endif() endif() @@ -590,7 +590,7 @@ macro(pkg_check_modules _prefix _module0) _pkgconfig_set(__pkg_config_arguments_${_prefix} "${_module0};${ARGN}") endif() elseif (${_prefix}_FOUND AND ${_imp_target}) - _pkg_create_imp_target("${_prefix}" _no_cmake_path _no_cmake_environment_path) + _pkg_create_imp_target("${_prefix}" ${_no_cmake_path} ${_no_cmake_environment_path}) endif() endmacro() @@ -644,7 +644,7 @@ macro(pkg_search_module _prefix _module0) _pkgconfig_set(__pkg_config_checked_${_prefix} ${PKG_CONFIG_VERSION}) elseif (${_prefix}_FOUND AND ${_imp_target}) - _pkg_create_imp_target("${_prefix}" _no_cmake_path _no_cmake_environment_path) + _pkg_create_imp_target("${_prefix}" ${_no_cmake_path} ${_no_cmake_environment_path}) endif() endmacro() -- cgit v0.12