Catch2 icon indicating copy to clipboard operation
Catch2 copied to clipboard

pkg-config file does not contain debug postfix

Open mhier opened this issue 11 months ago • 0 comments

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.a does not exist
  • build Catch2 with -DCMAKE_BUILD_TYPE=Debug, and install to
  • pkg-config catch2 --libs shows e.g. -L<prefix>/lib -lCatch2
  • <prefix>/lib/libCatch2.a does not exist, but - <prefix>/lib/libCatch2d.a does.

Platform information:

  • OS: Ubuntu 24.04
  • Compiler+version: GCC 13.3.0
  • Catch version: v3.8.1

mhier avatar May 06 '25 12:05 mhier