summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryangwei <[email protected]>2020-09-07 14:15:48 +0800
committeryangwei <[email protected]>2020-09-07 14:15:48 +0800
commite6e1f8494ec3d2e1dc21b7a9dbbcf57a5397e134 (patch)
treeba5339f5341377a916ab424d27e1df846273bc73
parent19911a962cbb83250e6ba1ecc7d8c1ee86d5db02 (diff)
UPDATE:增加soversion
-rw-r--r--CMakeLists.txt6
1 files changed, 6 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9ff3645..e74949d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -4,6 +4,9 @@ set(lib_name MESA_handle_logger)
project (${lib_name})
+set(LIB_MAJOR_VERSION 2)
+set(LIB_MINOR_VERSION 0)
+
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
include(Version)
@@ -50,6 +53,9 @@ else()
set_target_properties(${lib_name}_shared PROPERTIES OUTPUT_NAME ${lib_name})
endif()
+set_target_properties(${lib_name}_shared PROPERTIES VERSION ${LIB_MAJOR_VERSION}.${LIB_MINOR_VERSION})
+set_target_properties(${lib_name}_shared PROPERTIES SOVERSION ${LIB_MAJOR_VERSION})
+
# static Library Output
add_library(${lib_name}_static STATIC ${SRC})
target_link_libraries(${lib_name}_static -Wl,--whole-archive zlog-static -Wl,--no-whole-archive)