libpng icon indicating copy to clipboard operation
libpng copied to clipboard

CMakeLists: Enable pkg-config on Windows

Open jonaski opened this issue 1 year ago • 4 comments

In libpng, it's hard-coded to exclude pkg-config on Windows unless it's MinGW or Cygwin. I use pkg-config with Visual Studio 2022 and I have to patch this out for CMake to install the pc file. I'm not sure what the original intention was here, installing the .pc file does no harm even if you do not use pkg-config, but if someone really needs to disable it, it should be a CMake option, not hard-coded like this. create_symlink() also works on Windows. Out of over 50 libraries I build on Windows, libpng is the only one that have this behavior.

jonaski avatar Jan 26 '24 00:01 jonaski

The patch is tested to work, see https://github.com/strawberrymusicplayer/strawberry-msvc-dependencies/actions/runs/7660160539/job/20876855934

jonaski avatar Jan 26 '24 00:01 jonaski

create_symlink() also works on Windows

There were some issues w/ it before: https://github.com/strukturag/libheif/pull/996#issuecomment-1766728427

kmilos avatar Jan 29 '24 15:01 kmilos