summaryrefslogtreecommitdiffstats
path: root/extras/vom
diff options
context:
space:
mode:
Diffstat (limited to 'extras/vom')
-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)