aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--extras/vom/CMakeLists.txt1
-rw-r--r--extras/vom/vom/CMakeLists.txt15
-rw-r--r--src/cmake/library.cmake4
3 files changed, 12 insertions, 8 deletions
diff --git a/extras/vom/CMakeLists.txt b/extras/vom/CMakeLists.txt
index e84e2a91850..916289023e8 100644
--- a/extras/vom/CMakeLists.txt
+++ b/extras/vom/CMakeLists.txt
@@ -22,6 +22,7 @@ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib)
set(CMAKE_INSTALL_MESSAGE NEVER)
+find_package(VPP)
find_package(Threads REQUIRED)
add_subdirectory(vom)
diff --git a/extras/vom/vom/CMakeLists.txt b/extras/vom/vom/CMakeLists.txt
index 76abd4604c5..6285983faa2 100644
--- a/extras/vom/vom/CMakeLists.txt
+++ b/extras/vom/vom/CMakeLists.txt
@@ -228,12 +228,13 @@ list(APPEND VOM_HEADERS
vxlan_tunnel.hpp
)
-add_library(vom SHARED ${VOM_SOURCES})
-target_link_libraries(vom ${VAPICLIENT_LIB} Threads::Threads boost_thread
- ${BOOST_SYSTEM_LIB} ${BOOST_FILESYSTEM_LIB} ${BOOST_ASIO_LIB} m rt)
add_definitions(-Wall -Werror -std=gnu++11)
-install(TARGETS vom DESTINATION lib)
-foreach(file ${VOM_HEADERS})
- install(FILES ${file} DESTINATION include/vom)
-endforeach()
+add_vpp_library(vom
+ SOURCES ${VOM_SOURCES}
+
+ INSTALL_HEADERS ${VOM_HEADERS}
+
+ LINK_LIBRARIES ${VAPICLIENT_LIB} Threads::Threads boost_thread
+ ${BOOST_SYSTEM_LIB} ${BOOST_FILESYSTEM_LIB} ${BOOST_ASIO_LIB} m rt
+)
diff --git a/src/cmake/library.cmake b/src/cmake/library.cmake
index e0eb7af76fc..b9e4f9b4bd8 100644
--- a/src/cmake/library.cmake
+++ b/src/cmake/library.cmake
@@ -21,7 +21,9 @@ macro(add_vpp_library lib)
add_library(${lib} SHARED ${ARG_SOURCES})
target_compile_options(${lib} PRIVATE -Wall)
- set_target_properties(${lib} PROPERTIES SOVERSION ${VPP_LIB_VERSION})
+ if(VPP_LIB_VERSION)
+ set_target_properties(${lib} PROPERTIES SOVERSION ${VPP_LIB_VERSION})
+ endif()
# library deps
if(ARG_LINK_LIBRARIES)