From 0b267c7959e7d568f82146d5c259f5a40a7fb481 Mon Sep 17 00:00:00 2001 From: Martchus Date: Wed, 23 Sep 2020 22:48:28 +0200 Subject: [PATCH] Avoid duplicating the "lib" prefix if the target name already starts with "lib" --- cmake/modules/LibraryTarget.cmake | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmake/modules/LibraryTarget.cmake b/cmake/modules/LibraryTarget.cmake index 97c630c..cf2cddb 100644 --- a/cmake/modules/LibraryTarget.cmake +++ b/cmake/modules/LibraryTarget.cmake @@ -169,6 +169,11 @@ else () AND VERSIONED_MINGW_LIBRARIES) set_target_properties(${META_TARGET_NAME} PROPERTIES SUFFIX "-${META_SOVERSION}.dll") endif () + + # avoid duplicating the "lib" prefix if the target name already starts with "lib" + if (META_TARGET_NAME MATCHES "lib.*") + set_target_properties(${META_TARGET_NAME} PROPERTIES PREFIX "") + endif () endif () # populate META_PUBLIC_LIB_DEPENDS