summaryrefslogtreecommitdiffstats
path: root/Modules/FindPkgConfig.cmake
diff options
context:
space:
mode:
authorHugo Beauzée-Luyssen <hugo@beauzee.fr>2019-12-02 15:42:07 (GMT)
committerHugo Beauzée-Luyssen <hugo@beauzee.fr>2019-12-02 15:47:04 (GMT)
commitf92a4b23994fa7516f16fbb5b3c02caa07534b3f (patch)
tree7d00613ca2d997d96d46fe97fdcbbb477ce8e960 /Modules/FindPkgConfig.cmake
parent735d731119e731c8a321f85824ee685005b38731 (diff)
downloadCMake-f92a4b23994fa7516f16fbb5b3c02caa07534b3f.zip
CMake-f92a4b23994fa7516f16fbb5b3c02caa07534b3f.tar.gz
CMake-f92a4b23994fa7516f16fbb5b3c02caa07534b3f.tar.bz2
FindPkgConfig: Fix path manipulations when cross compiling
When cross compiling from a unix machine, if(UNIX) is false, whih causes the path not to be fixed for unix, leading to false negative if PKG_CONFIG_PATH needs to be probed
Diffstat (limited to 'Modules/FindPkgConfig.cmake')
-rw-r--r--Modules/FindPkgConfig.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/FindPkgConfig.cmake b/Modules/FindPkgConfig.cmake
index 5162a44..f4b6ea1 100644
--- a/Modules/FindPkgConfig.cmake
+++ b/Modules/FindPkgConfig.cmake
@@ -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()