summaryrefslogtreecommitdiff
path: root/Modules/FindPkgConfig.cmake
diff options
context:
space:
mode:
authorHugo Beauzée-Luyssen <hugo@beauzee.fr>2019-12-02 16:42:07 +0100
committerHugo Beauzée-Luyssen <hugo@beauzee.fr>2019-12-02 16:47:04 +0100
commitf92a4b23994fa7516f16fbb5b3c02caa07534b3f (patch)
tree7d00613ca2d997d96d46fe97fdcbbb477ce8e960 /Modules/FindPkgConfig.cmake
parent735d731119e731c8a321f85824ee685005b38731 (diff)
downloadcmake-f92a4b23994fa7516f16fbb5b3c02caa07534b3f.tar.gz
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 5162a44b33..f4b6ea121c 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()