Merge topic 'FindPkgConfig-protect-semicolons'

53511936 FindPkgConfig: Quote ${_pkgconfig_path} to protect semicolons on Windows
This commit is contained in:
Brad King 2016-01-20 08:33:27 -05:00 committed by CMake Topic Stage
commit 211d097998
1 changed files with 4 additions and 4 deletions

View File

@ -238,8 +238,8 @@ macro(_pkg_check_modules_internal _is_required _is_silent _no_cmake_path _no_cma
if(NOT "${_extra_paths}" STREQUAL "") if(NOT "${_extra_paths}" STREQUAL "")
# Save the PKG_CONFIG_PATH environment variable, and add paths # Save the PKG_CONFIG_PATH environment variable, and add paths
# from the CMAKE_PREFIX_PATH variables # from the CMAKE_PREFIX_PATH variables
set(_pkgconfig_path_old $ENV{PKG_CONFIG_PATH}) set(_pkgconfig_path_old "$ENV{PKG_CONFIG_PATH}")
set(_pkgconfig_path ${_pkgconfig_path_old}) set(_pkgconfig_path "${_pkgconfig_path_old}")
if(NOT "${_pkgconfig_path}" STREQUAL "") if(NOT "${_pkgconfig_path}" STREQUAL "")
file(TO_CMAKE_PATH "${_pkgconfig_path}" _pkgconfig_path) file(TO_CMAKE_PATH "${_pkgconfig_path}" _pkgconfig_path)
endif() 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}")
string(REPLACE "\\ " " " _pkgconfig_path "${_pkgconfig_path}") string(REPLACE "\\ " " " _pkgconfig_path "${_pkgconfig_path}")
endif() endif()
set(ENV{PKG_CONFIG_PATH} ${_pkgconfig_path}) set(ENV{PKG_CONFIG_PATH} "${_pkgconfig_path}")
endif() endif()
# Unset variables # 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 "") if(NOT "${_extra_paths}" STREQUAL "")
# Restore the environment variable # Restore the environment variable
set(ENV{PKG_CONFIG_PATH} ${_pkgconfig_path_old}) set(ENV{PKG_CONFIG_PATH} "${_pkgconfig_path_old}")
endif() endif()
unset(_extra_paths) unset(_extra_paths)