diff options
author | Ralf Habacker <ralf.habacker@freenet.de> | 2023-02-24 10:01:11 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2023-02-27 14:18:34 (GMT) |
commit | a7f9c7da2618c795db534890124718fd0d9c73ce (patch) | |
tree | 2cd5286820740111a87520731c8cf86282118388 /Source/cmTarget.cxx | |
parent | 9694504adcdc44492a2e088343cd5be1fd28d270 (diff) | |
download | CMake-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/cmTarget.cxx')
-rw-r--r-- | Source/cmTarget.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 91d5de6..2186cf0 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -305,6 +305,8 @@ struct TargetProperty LinkableLibraryTarget, // Needs to be an executable. ExecutableTarget, + // Needs to be a shared library (`SHARED`). + SharedLibraryTarget, // Needs to be a target with meaningful symbol exports (`SHARED` or // `EXECUTABLE`). TargetWithSymbolExports, @@ -484,6 +486,7 @@ TargetProperty const StaticTargetProperties[] = { // ---- macOS { "FRAMEWORK_MULTI_CONFIG_POSTFIX_"_s, IC::LinkableLibraryTarget, R::PerConfig }, // ---- Windows + { "DLL_NAME_WITH_SOVERSION"_s, IC::SharedLibraryTarget }, { "GNUtoMS"_s, IC::CanCompileSources }, { "WIN32_EXECUTABLE"_s, IC::CanCompileSources }, { "WINDOWS_EXPORT_ALL_SYMBOLS"_s, IC::TargetWithSymbolExports }, @@ -1003,6 +1006,9 @@ cmTarget::cmTarget(std::string const& name, cmStateEnums::TargetType type, metConditions.insert( TargetProperty::InitCondition::LinkableLibraryTarget); } + if (this->impl->TargetType == cmStateEnums::SHARED_LIBRARY) { + metConditions.insert(TargetProperty::InitCondition::SharedLibraryTarget); + } } if (this->impl->TargetType == cmStateEnums::EXECUTABLE) { metConditions.insert(TargetProperty::InitCondition::ExecutableTarget); |