From af479c01d615d105a28ee6a2089b8ee28574af1a Mon Sep 17 00:00:00 2001 From: Kai Blaschke Date: Tue, 2 Dec 2025 18:04:26 +0100 Subject: [PATCH] Fix installed pkgconfig files using wrong linker argument for some unknown reason I used "-l:" in the .pc files while it should just be "-l". This would prevent libprojectM (and the playlist lib) from being linked in projects using pkgconfig. --- cmake/GeneratePkgConfigFiles.cmake | 2 +- cmake/pkgconfig-file.in | 2 +- src/libprojectM/CMakeLists.txt | 2 +- src/playlist/CMakeLists.txt | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cmake/GeneratePkgConfigFiles.cmake b/cmake/GeneratePkgConfigFiles.cmake index 640c595ace..106cefbc98 100644 --- a/cmake/GeneratePkgConfigFiles.cmake +++ b/cmake/GeneratePkgConfigFiles.cmake @@ -23,7 +23,7 @@ macro(GENERATE_PKG_CONFIG_FILES target package_name) endforeach() endif() - # Get name for "-l:" linker flags + # Get name for "-l" linker flags get_target_property(_lib_name ${target} OUTPUT_NAME) # Using different package name for debug and release, as pkg-config doesn't support diff --git a/cmake/pkgconfig-file.in b/cmake/pkgconfig-file.in index fc27c9e170..8a2b9c8b00 100644 --- a/cmake/pkgconfig-file.in +++ b/cmake/pkgconfig-file.in @@ -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@ diff --git a/src/libprojectM/CMakeLists.txt b/src/libprojectM/CMakeLists.txt index f05808f4a8..4dc2f196c6 100644 --- a/src/libprojectM/CMakeLists.txt +++ b/src/libprojectM/CMakeLists.txt @@ -211,7 +211,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}") diff --git a/src/playlist/CMakeLists.txt b/src/playlist/CMakeLists.txt index 3e6a2f42c2..05ff116b9d 100644 --- a/src/playlist/CMakeLists.txt +++ b/src/playlist/CMakeLists.txt @@ -158,7 +158,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")