From af67922d18631a33fca11a66a527407948051e18 Mon Sep 17 00:00:00 2001 From: Junfeng Wang Date: Thu, 18 Apr 2019 01:16:15 +0000 Subject: when "make build-package", we need to "make build-scvpp" first, because we use pkgconfig to find dependence(libscvpp.so). this patch will compile libscvpp.so when compile plugin,you needn't extra step. Change-Id: I9dcd733ec3535a8fa5310f75ae141712320affa5 Signed-off-by: Junfeng Wang --- README.md | 1 + src/CMakeLists.txt | 2 +- src/plugins/CMakeLists.txt | 6 ++++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 83e6864..dbbf74c 100644 --- a/README.md +++ b/README.md @@ -56,6 +56,7 @@ Then, please start each daemon one by one: ``` Now you can utilize Sweetcomb. +Notice: if you install from package, you should import module by youself. ## Manual Test For example, if you want to configure ipv4 address on HW interface TenGigabitEthernet5/0/0, diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index f5be384..ef739e9 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -24,7 +24,7 @@ endif() string(TOLOWER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_LOWER) # add subdirectories -add_subdirectory(scvpp) +# add_subdirectory(scvpp) add_subdirectory(plugins) include(Packager) diff --git a/src/plugins/CMakeLists.txt b/src/plugins/CMakeLists.txt index d7f38e0..a07ae60 100644 --- a/src/plugins/CMakeLists.txt +++ b/src/plugins/CMakeLists.txt @@ -25,7 +25,9 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/../cmake") find_package(VPP) #use FindVPP.cmake find_package(PkgConfig) #official cmake module pkg_check_modules(SYSREPO REQUIRED libsysrepo) #PkgConfig cmake module maccro -pkg_check_modules(SCVPP REQUIRED libscvpp) #PkgConfig cmake module maccro + +add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/../scvpp scvpp_out) +include_directories(${CMAKE_CURRENT_LIST_DIR}/../scvpp/inc) # get sysrepo plugins directory from pkgconfig if (NOT SR_PLUGINS_DIR) @@ -63,7 +65,7 @@ set(PLUGINS_SOURCES # build the source code into shared library add_library(vpp-plugins SHARED ${PLUGINS_SOURCES}) -target_link_libraries(vpp-plugins ${SYSREPO_LIBRARIES} ${SCVPP_LIBRARIES}) +target_link_libraries(vpp-plugins ${SYSREPO_LIBRARIES} scvpp) # INSTALL ######### -- cgit 1.2.3-korg