summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorTarget.cxx
diff options
context:
space:
mode:
authorRalf Habacker <ralf.habacker@freenet.de>2023-02-24 10:01:11 (GMT)
committerBrad King <brad.king@kitware.com>2023-02-27 14:18:34 (GMT)
commita7f9c7da2618c795db534890124718fd0d9c73ce (patch)
tree2cd5286820740111a87520731c8cf86282118388 /Source/cmGeneratorTarget.cxx
parent9694504adcdc44492a2e088343cd5be1fd28d270 (diff)
downloadCMake-a7f9c7da2618c795db534890124718fd0d9c73ce.zip
CMake-a7f9c7da2618c795db534890124718fd0d9c73ce.tar.gz
CMake-a7f9c7da2618c795db534890124718fd0d9c73ce.tar.bz2
Add option to add SOVERSION to DLL names
Add variable/target property `[CMAKE_]DLL_NAME_WITH_SOVERSION`. Fixes: #24251 Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r--Source/cmGeneratorTarget.cxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index be6456b..cfb2887 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -5475,9 +5475,15 @@ cmGeneratorTarget::GetFullNameInternalComponents(
// Name shared libraries with their version number on some platforms.
if (cmValue soversion = this->GetProperty("SOVERSION")) {
+ cmValue dllProp;
+ if (this->IsDLLPlatform()) {
+ dllProp = this->GetProperty("DLL_NAME_WITH_SOVERSION");
+ }
if (this->GetType() == cmStateEnums::SHARED_LIBRARY &&
!isImportedLibraryArtifact &&
- this->Makefile->IsOn("CMAKE_SHARED_LIBRARY_NAME_WITH_VERSION")) {
+ (dllProp.IsOn() ||
+ (!dllProp.IsSet() &&
+ this->Makefile->IsOn("CMAKE_SHARED_LIBRARY_NAME_WITH_VERSION")))) {
outBase += "-";
outBase += *soversion;
}