OpenColorIO
OpenColorIO copied to clipboard
Install the pkg-config file when building under MSYS on windows?
Hi,
it would be good if the pkg-config script (OpenColorIO.pc) was installed when building under MSYS on windows. Here's a simple patch to do that:
--- b/src/OpenColorIO/CMakeLists.txt 2022-06-05 20:59:43.000000000 +0200
+++ a/src/OpenColorIO/CMakeLists.txt 2022-08-23 17:17:20.516786583 +0200
@@ -171,7 +171,7 @@
SystemMonitor.cpp
)
-if(NOT WIN32)
+if(NOT WIN32 OR MSYS)
# Install the pkg-config file.
This should be MINGW instead of MSYS. (MSYS is a POSIX emulation environment like Cygwin where I doubt OCIO is useful; one is typically building for the WIn32 API, i.e. MINGW). An alternative is to change this to the more readable if(UNIX or MINGW) (UNIX covers both Apple and Cygwin in addition).
FYI, pkg-config runs everywhere (available via vcpkg for MSVC), so the if clause should just be simply removed and the .pc file installed always.
pkgconf is also a working alternative if you use Meson.
Indeed, vcpkg seem to use meson+pkgconf quite a bit for Win32 packaging.
@agriggio , @kmilos , @amyspark Please review PR #1720 and check that it meets your needs, thanks!