cmake: enable SOVERSION for Cygwin and CMAKE_DLL_NAME_WITH_SOVERSION

- enable SOVERSION when `CMAKE_DLL_NAME_WITH_SOVERSION=ON` is set.
  Ref: https://cmake.org/cmake/help/v3.27/variable/CMAKE_DLL_NAME_WITH_SOVERSION.html
  Use: https://github.com/search?q=-DCMAKE_DLL_NAME_WITH_SOVERSION&type=code

- enable SOVERSION for Cygwin builds by default.

Ref: #13936
Ref: #13944
Closes #13898
This commit is contained in:
Viktor Szakats 2024-06-13 13:43:59 +02:00
parent bd2d5db549
commit e5a35b493d
No known key found for this signature in database
GPG Key ID: B5ABD165E2AEF201

View File

@ -191,7 +191,9 @@ if(BUILD_SHARED_LIBS)
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
$<BUILD_INTERFACE:${CURL_SOURCE_DIR}/include>)
if(APPLE OR
if(CMAKE_DLL_NAME_WITH_SOVERSION OR
CYGWIN OR
APPLE OR
CMAKE_SYSTEM_NAME STREQUAL "AIX" OR
CMAKE_SYSTEM_NAME STREQUAL "Linux" OR
CMAKE_SYSTEM_NAME STREQUAL "SunOS" OR