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

CMake: Generate pkg-config files for all Windows builds #396

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

Commits on Feb 8, 2023

  1. CMake: Generate pkg-config files for all Windows builds

    The Meson build system makes use of pkg-config files or CMake to find most of
    the dependencies via its "built-in" dependency search system.  As libpng is a
    very widely used package, this makes the CMake build system generate pkg-config
    files for libpng even for non-Cygwin/non-MinGW Windows builds, so that Meson
    could locate libpng via pkg-config as well even on Visual Studio builds, for
    instance.
    
    We also do the following on native, non-MinGW Windows builds:
    
    *  Replace -lpngXX with libpngXX.lib, for the libpng library that we link to
    *  Use the correct ZLib library .lib name for `libs.private`.
    *  Replace `Requires.private: zlib` with `Requires.private:`, since we already
       say in `libs.private` that we are linking to ZLib
    fanc999-1 committed Feb 8, 2023
    Configuration menu
    Copy the full SHA
    d92ac10 View commit details
    Browse the repository at this point in the history
  2. CMakeLists.txt: Fix stylelistic issues

    Use all-lowercase for CMake commands
    fanc999-1 committed Feb 8, 2023
    Configuration menu
    Copy the full SHA
    1dc7cca View commit details
    Browse the repository at this point in the history
  3. CMakeLists.txt: Improve pkg-config generating on Windows

    Use the target properties of ZLIB::ZLIB to get the library names for the
    pkg-config files that we generate, and unify things with other builds.
    We need to use the IMPORT_LOCATION[_$<CONFIG>] for ZLib since it does not
    define IMPORT_IMPLIB[_$<CONFIG>] even on Windows DLL builds, and assume
    that the $<CONFIG> we use above is RELEASE for both MinSizeRel and
    RelWithDebInfo builds.
    fanc999-1 committed Feb 8, 2023
    Configuration menu
    Copy the full SHA
    c3d2bdf View commit details
    Browse the repository at this point in the history