google / google/libultrahdr

Missing flag in pkgconfig file

Open
#289 2 comments 1 reaction 0 assignees View on GitHub
Dominant language
C++
Stars
344
Forks
67
Avg merge
15d 2h
Merged PRs (30d)
7

Description

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](https://www.msys2.org/docs/pkgconfig/#cflagsprivate-static-libraries) 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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.