summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authoryangwei <[email protected]>2019-05-05 17:08:08 +0800
committeryangwei <[email protected]>2019-05-05 17:08:08 +0800
commitded34c32ad91ecbb85c91033a44ab5f90ed9eafb (patch)
tree6d39c3e77b740654d40a7793c7f883e4c3db45d5 /CMakeLists.txt
parentf107e3c13bf51eab8f1f5557331a1aad58e2dbc7 (diff)
同步makefile内容,在cmake编译动态库时,增加version-script
Diffstat (limited to 'CMakeLists.txt')
-rwxr-xr-xCMakeLists.txt2
1 files changed, 2 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c61c70c..67f0a21 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -38,6 +38,8 @@ file(GLOB SRC
# Shared Library Output
add_library(${lib_name}_shared SHARED ${SRC})
+set_target_properties(${lib_name}_shared PROPERTIES LINK_FLAGS
+ "-Wl,--version-script=${PROJECT_SOURCE_DIR}/src/version.map")
set_target_properties(${lib_name}_shared PROPERTIES OUTPUT_NAME ${lib_name})
# static Library Output