Catch2
Catch2 copied to clipboard
pkg-config file does not contain debug postfix
Describe the bug For debug builds, a debug postfix "d" is added to the library name, but the generated .pc file for pkg-config contains the library file without the debug postfix. As a result, the library is not found when using pkg-config for a debug build of Catch2.
Expected behavior The actual library name should be referenced in the .pc file for all build configurations.
Reproduction steps
-
<prefix>/lib/libCatch2.adoes not exist - build Catch2 with -DCMAKE_BUILD_TYPE=Debug, and install to
-
pkg-config catch2 --libsshows e.g.-L<prefix>/lib -lCatch2 -
<prefix>/lib/libCatch2.adoes not exist, but -<prefix>/lib/libCatch2d.adoes.
Platform information:
- OS: Ubuntu 24.04
- Compiler+version: GCC 13.3.0
- Catch version: v3.8.1