diff options
author | José Bollo <jose.bollo@iot.bzh> | 2019-10-04 14:22:10 +0200 |
---|---|---|
committer | José Bollo <jose.bollo@iot.bzh> | 2019-10-04 21:29:31 +0200 |
commit | 175e632803f9d40e019e6e7a8b3190b649b2f877 (patch) | |
tree | ed7df18442cc24edca7d38ee1d291b2a6245af5a | |
parent | 672b2ff67eefa306f29384135e92b2dcd84efcdc (diff) |
Backport to cmake 3.12
The command target_link_options only appear in
cmake 3.13
Change-Id: Ie66464244a139531dfa8ca4f239c53f9d2f3afaa
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
-rw-r--r-- | compat/src/CMakeLists.txt | 5 | ||||
-rw-r--r-- | src/CMakeLists.txt | 12 |
2 files changed, 5 insertions, 12 deletions
diff --git a/compat/src/CMakeLists.txt b/compat/src/CMakeLists.txt index b033987..7c8feca 100644 --- a/compat/src/CMakeLists.txt +++ b/compat/src/CMakeLists.txt @@ -27,14 +27,11 @@ set_target_properties(cynara-compat PROPERTIES VERSION ${CYNARA_VERSION} SOVERSION ${CYNARA_SOVERSION} + LINK_FLAGS -Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/export-cynara-compat.map ) target_link_libraries(cynara-compat PRIVATE cynagora ) -target_link_options(cynara-compat - PRIVATE - -Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/export-cynara-compat.map -) install(TARGETS cynara-compat LIBRARY DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR}) ########################################### diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index cc7884c..8fdb9e7 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -55,10 +55,8 @@ add_library(cynagora-core SHARED ${LIBCORE_SOURCES}) target_include_directories(cynagora-core PUBLIC .) set_target_properties(cynagora-core PROPERTIES VERSION ${CYNAGORA_VERSION} - SOVERSION ${CYNAGORA_SOVERSION}) -target_link_libraries(cynagora-core - PRIVATE - -Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/export-cynagora-core.map + SOVERSION ${CYNAGORA_SOVERSION} + LINK_FLAGS -Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/export-cynagora-core.map ) install(TARGETS cynagora-core LIBRARY DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR}) @@ -72,10 +70,8 @@ target_compile_definitions(cynagora PRIVATE ) set_target_properties(cynagora PROPERTIES VERSION ${CYNAGORA_VERSION} - SOVERSION ${CYNAGORA_SOVERSION}) -target_link_options(cynagora - PRIVATE - -Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/export-cynagora.map + SOVERSION ${CYNAGORA_SOVERSION} + LINK_FLAGS -Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/export-cynagora.map ) install(TARGETS cynagora LIBRARY DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR}) install(FILES cynagora.h DESTINATION ${CMAKE_INSTALL_FULL_INCLUDEDIR}) |