Skip to content

Missing flag in pkgconfig file #289

@kmilos

Description

@kmilos

Although not strictly necessary and functions without so far, the -DUHDR_USING_SHARED_LIBRARY hint might help the linker generate more optimal output on Windows.

When building a shared lib on Windows (any compiler), the resulting .pc file should look like:

Cflags: -I${includedir} -DUHDR_USING_SHARED_LIBRARY

P.S. At least on MSYS2 (using pkgconf rather than pkg-config), the same .pc file can also support both shared and static libs by also adding the (undocumented)

Cflags.private: -UUHDR_USING_SHARED_LIBRARY

as well.

See e.g. https://github.com/msys2/MINGW-packages/blob/master/mingw-w64-libdeflate/002-pkg-config.patch

Edit: I see that vcpkg also ships pkgconf rather than pkg-config, so should work out there as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions