Fix installed pkgconfig files using wrong linker argument

for some unknown reason I used "-l:<lib>" in the .pc files while it should just be "-l<lib>". This would prevent libprojectM (and the playlist lib) from being linked in projects using pkgconfig.
This commit is contained in:
Kai Blaschke
2025-12-02 18:04:26 +01:00
parent 3158ee615e
commit 6e3479b6c5
4 changed files with 4 additions and 4 deletions

View File

@ -23,7 +23,7 @@ macro(GENERATE_PKG_CONFIG_FILES target package_name)
endforeach()
endif()
# Get name for "-l:<name>" linker flags
# Get name for "-l<name>" linker flags
get_target_property(_lib_name ${target} OUTPUT_NAME)
# Using different package name for debug and release, as pkg-config doesn't support

View File

@ -9,5 +9,5 @@ Name: @PKGCONFIG_PACKAGE_NAME@
Version: @PROJECT_VERSION@
Description: @PKGCONFIG_PACKAGE_DESCRIPTION@
Requires: @PKGCONFIG_PACKAGE_REQUIREMENTS@
Libs: -L${libdir} -l:@PKGCONFIG_PROJECTM_LIBRARY@ @PKGCONFIG_LIBS@
Libs: -L${libdir} -l@PKGCONFIG_PROJECTM_LIBRARY@ @PKGCONFIG_LIBS@
Cflags: -I${includedir} @PKGCONFIG_FLAGS@

View File

@ -207,7 +207,7 @@ if(ENABLE_INSTALL)
# into pkgconfig's expected format.
# We will just assume the build uses Boost from the default location (e.g. not a custom CMAKE_PREFIX_PATH) and
# the library name is correct.
set(PKGCONFIG_LIBS "${PKGCONFIG_LIBS} -l:boost_filesystem")
set(PKGCONFIG_LIBS "${PKGCONFIG_LIBS} -lboost_filesystem")
endif()
set(PKGCONFIG_PACKAGE_NAME "${PROJECTM_LIBRARY_BASE_OUTPUT_NAME}")

View File

@ -154,7 +154,7 @@ if(ENABLE_INSTALL)
# into pkgconfig's expected format.
# We will just assume the build uses Boost from the default location (e.g. not a custom CMAKE_PREFIX_PATH) and
# the library name is correct.
set(PKGCONFIG_LIBS "${PKGCONFIG_LIBS} -l:boost_filesystem")
set(PKGCONFIG_LIBS "${PKGCONFIG_LIBS} -lboost_filesystem")
endif()
set(PKGCONFIG_PACKAGE_NAME "${PROJECTM_LIBRARY_BASE_OUTPUT_NAME}-playlist")