From 752f5b4302317e2ccfbd1903d31d3e857d719c4d Mon Sep 17 00:00:00 2001 From: Mohsin Kazmi Date: Tue, 12 Feb 2019 17:24:17 +0100 Subject: deb-pkg: Add libvom package support Change-Id: I370a5198ea5b768d8c505679662a19797bd2740d Signed-off-by: Mohsin Kazmi --- Makefile | 9 +++++++++ build-data/packages/vom.mk | 4 ++++ extras/vom/vom/CMakeLists.txt | 16 +++++----------- 3 files changed, 18 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index d83cc4f4eeb..da85e9b3e94 100644 --- a/Makefile +++ b/Makefile @@ -204,6 +204,7 @@ help: @echo " test-help - show help on test framework" @echo " run-vat - run vpp-api-test tool" @echo " pkg-deb - build DEB packages" + @echo " vom-pkg-deb - build vom DEB packages" @echo " pkg-rpm - build RPM packages" @echo " install-ext-deps - install external development dependencies" @echo " ctags - (re)generate ctags database" @@ -494,9 +495,17 @@ run-vat: pkg-deb: $(call make,$(PLATFORM),vpp-package-deb) +vom-pkg-deb: + $(call make,$(PLATFORM),vpp-package-deb) + $(call make,$(PLATFORM),vom-package-deb) + pkg-deb-debug: $(call make,$(PLATFORM)_debug,vpp-package-deb) +vom-pkg-deb-debug: + $(call make,$(PLATFORM)_debug,vpp-package-deb) + $(call make,$(PLATFORM)_debug,vom-package-deb) + pkg-rpm: dist make -C extras/rpm diff --git a/build-data/packages/vom.mk b/build-data/packages/vom.mk index e7e02282db4..fefd49ac841 100644 --- a/build-data/packages/vom.mk +++ b/build-data/packages/vom.mk @@ -39,3 +39,7 @@ vom_configure = \ vom_build = $(CMAKE) --build $(PACKAGE_BUILD_DIR) -- $(MAKE_PARALLEL_FLAGS) vom_install = $(CMAKE) --build $(PACKAGE_BUILD_DIR) -- install + +vom-package-deb: vom-install + @$(CMAKE) --build $(PACKAGE_BUILD_DIR)/vom -- package + @find $(PACKAGE_BUILD_DIR)/vom -name '*.deb' -exec mv {} $(CURDIR) \; diff --git a/extras/vom/vom/CMakeLists.txt b/extras/vom/vom/CMakeLists.txt index 8c87167218c..cebf152d1f8 100644 --- a/extras/vom/vom/CMakeLists.txt +++ b/extras/vom/vom/CMakeLists.txt @@ -282,17 +282,11 @@ list(APPEND VOM_HEADERS ) add_definitions(-Wall -Werror -std=gnu++11) - -add_vpp_library(vom - SOURCES ${VOM_SOURCES} - - INSTALL_HEADERS ${VOM_HEADERS} - - LINK_LIBRARIES ${VPPAPICLIENT_LIB} ${VAPICLIENT_LIB} Threads::Threads - ${Boost_SYSTEM_LIBRARY} ${Boost_FILESYSTEM_LIBRARY} m rt - - COMPONENT libvom -) +add_library(vom SHARED ${VOM_SOURCES}) +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) +install(FILES ${VOM_HEADERS} DESTINATION include/vom COMPONENT vom) if (Boost_FOUND) if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") -- cgit 1.2.3-korg