Skip to content

pkg-config file does not contain debug postfix #2979

@mhier

Description

@mhier

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Building and PackagingIssues affecting build/packaging scripts and utilities

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions