aboutsummaryrefslogtreecommitdiffstats
path: root/extras
diff options
context:
space:
mode:
authorMohsin Kazmi <sykazmi@cisco.com>2019-02-20 11:07:27 +0100
committerMohsin Kazmi <sykazmi@cisco.com>2019-02-20 13:11:48 +0100
commit84442eed6d0debaa0597e6e58f21f4b45c40ad7a (patch)
tree5adb398c98c39b47e9fd5edac05725070b03b969 /extras
parent0be7451ddb82e31d5dd140756b185d1f3d85d4c7 (diff)
vom: Fix the versioning issue [vpp-1555]
vom library was missing version apended to libvom.so This patch fixes this issue. Change-Id: I99a6c282d651e1882574af999f04610d7a2c4d44 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Diffstat (limited to 'extras')
-rw-r--r--extras/vom/CMakeLists.txt8
-rw-r--r--extras/vom/vom/CMakeLists.txt3
2 files changed, 11 insertions, 0 deletions
diff --git a/extras/vom/CMakeLists.txt b/extras/vom/CMakeLists.txt
index a04df5d52ab..4853196b5fe 100644
--- a/extras/vom/CMakeLists.txt
+++ b/extras/vom/CMakeLists.txt
@@ -18,6 +18,14 @@ project(vom)
include(CheckCCompilerFlag)
include(CheckCXXCompilerFlag)
+unset (VOM_LIB_VERSION)
+execute_process(
+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+ COMMAND bash -c "git describe | cut -f1 -d- | cut -dv -f2"
+ OUTPUT_VARIABLE VOM_LIB_VERSION
+ OUTPUT_STRIP_TRAILING_WHITESPACE
+)
+
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib)
set(CMAKE_INSTALL_MESSAGE NEVER)
diff --git a/extras/vom/vom/CMakeLists.txt b/extras/vom/vom/CMakeLists.txt
index cebf152d1f8..a0a5f9783e9 100644
--- a/extras/vom/vom/CMakeLists.txt
+++ b/extras/vom/vom/CMakeLists.txt
@@ -283,6 +283,9 @@ list(APPEND VOM_HEADERS
add_definitions(-Wall -Werror -std=gnu++11)
add_library(vom SHARED ${VOM_SOURCES})
+if (VOM_LIB_VERSION)
+ set_target_properties(vom PROPERTIES SOVERSION ${VOM_LIB_VERSION})
+endif()
target_link_libraries(vom ${VPPAPICLIENT_LIB} ${VAPICLIENT_LIB} Threads::Threads
${Boost_SYSTEM_LIBRARY} ${Boost_FILESYSTEM_LIBRARY} m rt)
install(TARGETS vom DESTINATION lib COMPONENT vom)