Merge topic 'FindPkgConfig-cross-compile'

f92a4b2399 FindPkgConfig: Fix path manipulations when cross compiling

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4106
This commit is contained in:
Brad King
2019-12-05 16:43:28 +00:00
committed by Kitware Robot

View File

@@ -337,7 +337,7 @@ macro(_pkg_set_path_internal)
# remove empty values from the list
list(REMOVE_ITEM _pkgconfig_path "")
file(TO_NATIVE_PATH "${_pkgconfig_path}" _pkgconfig_path)
if(UNIX)
if(CMAKE_HOST_UNIX)
string(REPLACE ";" ":" _pkgconfig_path "${_pkgconfig_path}")
string(REPLACE "\\ " " " _pkgconfig_path "${_pkgconfig_path}")
endif()