Skip to content

Commit

Permalink
FindPkgConfig: Fix path manipulations when cross compiling
Browse files Browse the repository at this point in the history
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
  • Loading branch information
chouquette committed Dec 2, 2019
1 parent 735d731 commit f92a4b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Modules/FindPkgConfig.cmake
Expand Up @@ -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()
Expand Down

0 comments on commit f92a4b2

Please sign in to comment.