mirror of
https://github.com/curl/curl.git
synced 2026-06-03 17:24:21 +03:00
cmake: use the LINK_OPTIONS property with CMake 3.13+
Replacing the superseded `LINK_FLAGS` in these versions.
Follow-up to 7b14449790 #14378
Closes #17039
This commit is contained in:
parent
4622099690
commit
14d4712db7
1 changed files with 5 additions and 2 deletions
|
|
@ -265,8 +265,11 @@ if(BUILD_SHARED_LIBS)
|
|||
set(CMAKE_REQUIRED_LINK_OPTIONS "-Wl,--version-script=${CMAKE_CURRENT_BINARY_DIR}/libcurl.vers")
|
||||
check_c_source_compiles("int main(void) { return 0; }" HAVE_VERSIONED_SYMBOLS)
|
||||
if(HAVE_VERSIONED_SYMBOLS)
|
||||
# Superseded by LINK_OPTIONS in CMake 3.13 and later.
|
||||
set_target_properties(${LIB_SHARED} PROPERTIES LINK_FLAGS "${CMAKE_REQUIRED_LINK_OPTIONS}")
|
||||
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.13)
|
||||
set_target_properties(${LIB_SHARED} PROPERTIES LINK_OPTIONS "${CMAKE_REQUIRED_LINK_OPTIONS}")
|
||||
else()
|
||||
set_target_properties(${LIB_SHARED} PROPERTIES LINK_FLAGS "${CMAKE_REQUIRED_LINK_OPTIONS}")
|
||||
endif()
|
||||
else()
|
||||
message(WARNING "Versioned symbols requested, but not supported by the toolchain.")
|
||||
endif()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue