From 84442eed6d0debaa0597e6e58f21f4b45c40ad7a Mon Sep 17 00:00:00 2001 From: Mohsin Kazmi Date: Wed, 20 Feb 2019 11:07:27 +0100 Subject: 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 --- extras/vom/CMakeLists.txt | 8 ++++++++ extras/vom/vom/CMakeLists.txt | 3 +++ 2 files changed, 11 insertions(+) (limited to 'extras') 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) -- cgit 1.2.3-korg