mirror of
https://github.com/curl/curl.git
synced 2026-08-26 00:53:39 +03:00
cmake: allow SOVERSION override with CURL_LIBCURL_SOVERSION
Allow overriding SOVERSION with the new CMake option: `CURL_LIBCURL_SOVERSION=ON/OFF` For certain target platforms the shared libcurl library filename contains the SOVERSION. This new option allows to enable/disable this behavior manually. If set, it takes precedence over the default setting. Ref: #13898 Closes #13944
This commit is contained in:
parent
e9507bd8a1
commit
bd2d5db549
1 changed files with 7 additions and 0 deletions
|
|
@ -201,7 +201,14 @@ if(BUILD_SHARED_LIBS)
|
||||||
# up to v3.x and ELF from v3.x. I cannot imagine someone running CMake
|
# up to v3.x and ELF from v3.x. I cannot imagine someone running CMake
|
||||||
# on those ancient systems.
|
# on those ancient systems.
|
||||||
CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
|
CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
|
||||||
|
set(soversion_default TRUE)
|
||||||
|
else()
|
||||||
|
set(soversion_default FALSE)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
option(CURL_LIBCURL_SOVERSION "Enable libcurl SOVERSION" ${soversion_default})
|
||||||
|
|
||||||
|
if(CURL_LIBCURL_SOVERSION)
|
||||||
transform_makefile_inc("Makefile.soname" "${CMAKE_CURRENT_BINARY_DIR}/Makefile.soname.cmake")
|
transform_makefile_inc("Makefile.soname" "${CMAKE_CURRENT_BINARY_DIR}/Makefile.soname.cmake")
|
||||||
include(${CMAKE_CURRENT_BINARY_DIR}/Makefile.soname.cmake)
|
include(${CMAKE_CURRENT_BINARY_DIR}/Makefile.soname.cmake)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue