Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMakeLists: Enable pkg-config on Windows #533

Open
wants to merge 2 commits into
base: libpng16
Choose a base branch
from

Conversation

jonaski
Copy link

@jonaski jonaski commented Jan 26, 2024

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
Copy link
Author

jonaski commented Jan 26, 2024

CMakeLists.txt Outdated Show resolved Hide resolved
@kmilos
Copy link

kmilos commented Jan 29, 2024

create_symlink() also works on Windows

There were some issues w/ it before: strukturag/libheif#996 (comment)

Copy link

@kmilos kmilos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

I saw the create_symlink() custom function handles Windows specially.

CMakeLists.txt Outdated Show resolved Hide resolved
jonaski and others added 2 commits June 9, 2024 00:20
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.

Co-Authored-By: Miloš Komarčević <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants