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
Родитель bd2d5db549
Коммит e5a35b493d
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5ABD165E2AEF201
1 изменённых файлов: 3 добавлений и 1 удалений

Просмотреть файл

@ -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