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 /Tests/RunCMake/TargetArtifacts/DLL-SOVERSION.cmake | |
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 'Tests/RunCMake/TargetArtifacts/DLL-SOVERSION.cmake')
-rw-r--r-- | Tests/RunCMake/TargetArtifacts/DLL-SOVERSION.cmake | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Tests/RunCMake/TargetArtifacts/DLL-SOVERSION.cmake b/Tests/RunCMake/TargetArtifacts/DLL-SOVERSION.cmake new file mode 100644 index 0000000..82eca0b --- /dev/null +++ b/Tests/RunCMake/TargetArtifacts/DLL-SOVERSION.cmake @@ -0,0 +1,18 @@ +enable_language(C) + +add_library(exA SHARED dll.c) +set_target_properties(exA PROPERTIES + SOVERSION 2 + DLL_NAME_WITH_SOVERSION 1 + ) + +set(CMAKE_DLL_NAME_WITH_SOVERSION 1) +add_library(exB SHARED dll.c) +set_property(TARGET exB PROPERTY SOVERSION 2) + +add_custom_target(checkNames ALL + COMMAND ${CMAKE_COMMAND} -E echo exA_name="$<TARGET_FILE_NAME:exA>" + COMMAND ${CMAKE_COMMAND} -E echo exB_name="$<TARGET_FILE_NAME:exB>" + VERBATIM + ) +add_dependencies(checkNames exA exB) |