FindPkgConfig/CrossCompiling Cannot set multiple CMAKE_PREFIX_PATH
Hi, I'm trying to compile (from linux x64 for win x86) one of my programs that requires libraries installed from two different locations.
You can find attached my toolchain and my cmake files Toolchain.i686-w64-mingw32.cmake CMakeLists.txt
As you can see, I set SET(CMAKE_PREFIX_PATH /build-tools/libvlcredist/vlc-4.0.0-dev/sdk;/build-tools/)
, which is correctly interpreted by cmake, but when it comes to finding my libvlc package, it does not find it.
After digging a little, it turns out that the UNIX
variable is empty in my case, causing this if (UNIX)
to be skipped. Then, PKG_CONFIG_PATH
is using ;
as a separator, causing the pkg-config to fail.
If I set manually UNIX to 1 in my CMakeLists.txt, the issue goes away.
Is there anything wrong with my configuration or is it a bug?