From 82c7055b5dc961b10a24e5b13ab0a1f272692cfc Mon Sep 17 00:00:00 2001 From: Florent Pruvost <florent.pruvost@inria.fr> Date: Fri, 24 Nov 2023 11:07:08 +0100 Subject: [PATCH] GenPkgConfig.cmake: fix lib list using REGEX REPLACE --- modules/GenPkgConfig.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/GenPkgConfig.cmake b/modules/GenPkgConfig.cmake index d729630..70647cd 100644 --- a/modules/GenPkgConfig.cmake +++ b/modules/GenPkgConfig.cmake @@ -102,9 +102,9 @@ macro(gpc_convert_libstyle_to_pkgconfig _liblist) get_filename_component(dep_libname ${_dep} NAME) get_filename_component(dep_libdir ${_dep} PATH) foreach( _ext ${CMAKE_FIND_LIBRARY_SUFFIXES} ) - string(REPLACE "${_ext}$" "" dep_libname "${dep_libname}") + string(REGEX REPLACE "${_ext}$" "" dep_libname "${dep_libname}") endforeach() - string(REPLACE "^lib" "" dep_libname "${dep_libname}") + string(REGEX REPLACE "^lib" "" dep_libname "${dep_libname}") list(APPEND ${_liblist} -L${dep_libdir} -l${dep_libname}) elseif(NOT ${_dep} MATCHES "^-") list(APPEND ${_liblist} "-l${_dep}") -- GitLab