Skip to content

Commit b40d119

Browse files
committed
Avoid conflict with CMake property DLL_NAME_WITH_SOVERSION
This CMake feature is available as of CMake 3.27 (see https://cmake.org/cmake/help/latest/prop_tgt/DLL_NAME_WITH_SOVERSION.html) but when used it'll duplicate what is already done via manually setting the `SUFFIX` property. So make sure `DLL_NAME_WITH_SOVERSION` is disabled.
1 parent f081c78 commit b40d119

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cmake/modules/LibraryTarget.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,9 @@ else ()
217217
string(REPLACE "." "-" META_DLLVERSION "${META_SOVERSION}")
218218
endif ()
219219
set_target_properties(${META_TARGET_NAME} PROPERTIES SUFFIX "-${META_DLLVERSION}.dll")
220+
if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.27")
221+
set_target_properties(${META_TARGET_NAME} PROPERTIES DLL_NAME_WITH_SOVERSION OFF)
222+
endif ()
220223
set(TARGET_SUFFIX_FOR_PC "-${META_DLLVERSION}")
221224
endif ()
222225

0 commit comments

Comments
 (0)