diff options
author | Brad King <brad.king@kitware.com> | 2016-01-20 13:33:27 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2016-01-20 13:33:27 (GMT) |
commit | 211d097998da4b730213645af4767fc24015f397 (patch) | |
tree | b63305f1d85e5d76a8a25c115de01cbf9c41654f /Modules | |
parent | 15fe480bf06f5ab5aae5641d2ebe6ca368099450 (diff) | |
parent | 53511936e43c14f362b1e1ba069a77f5ba251ccc (diff) | |
download | CMake-211d097998da4b730213645af4767fc24015f397.zip CMake-211d097998da4b730213645af4767fc24015f397.tar.gz CMake-211d097998da4b730213645af4767fc24015f397.tar.bz2 |
Merge topic 'FindPkgConfig-protect-semicolons'
53511936 FindPkgConfig: Quote ${_pkgconfig_path} to protect semicolons on Windows
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/FindPkgConfig.cmake | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Modules/FindPkgConfig.cmake b/Modules/FindPkgConfig.cmake index f24d2da..177e7b8 100644 --- a/Modules/FindPkgConfig.cmake +++ b/Modules/FindPkgConfig.cmake @@ -238,8 +238,8 @@ macro(_pkg_check_modules_internal _is_required _is_silent _no_cmake_path _no_cma if(NOT "${_extra_paths}" STREQUAL "") # Save the PKG_CONFIG_PATH environment variable, and add paths # from the CMAKE_PREFIX_PATH variables - set(_pkgconfig_path_old $ENV{PKG_CONFIG_PATH}) - set(_pkgconfig_path ${_pkgconfig_path_old}) + set(_pkgconfig_path_old "$ENV{PKG_CONFIG_PATH}") + set(_pkgconfig_path "${_pkgconfig_path_old}") if(NOT "${_pkgconfig_path}" STREQUAL "") file(TO_CMAKE_PATH "${_pkgconfig_path}" _pkgconfig_path) endif() @@ -285,7 +285,7 @@ macro(_pkg_check_modules_internal _is_required _is_silent _no_cmake_path _no_cma string(REPLACE ";" ":" _pkgconfig_path "${_pkgconfig_path}") string(REPLACE "\\ " " " _pkgconfig_path "${_pkgconfig_path}") endif() - set(ENV{PKG_CONFIG_PATH} ${_pkgconfig_path}) + set(ENV{PKG_CONFIG_PATH} "${_pkgconfig_path}") endif() # Unset variables @@ -401,7 +401,7 @@ macro(_pkg_check_modules_internal _is_required _is_silent _no_cmake_path _no_cma if(NOT "${_extra_paths}" STREQUAL "") # Restore the environment variable - set(ENV{PKG_CONFIG_PATH} ${_pkgconfig_path_old}) + set(ENV{PKG_CONFIG_PATH} "${_pkgconfig_path_old}") endif() unset(_extra_paths) |