aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJunfeng Wang <Drenfong.Wang@intel.com>2019-04-18 01:16:15 +0000
committerJunfeng Wang <Drenfong.Wang@intel.com>2019-04-18 02:09:49 +0000
commitaf67922d18631a33fca11a66a527407948051e18 (patch)
treebc0c50356d79405924abc287469d38b96132eb67
parent124193a900f81146936918d1ec90a7bde64420a2 (diff)
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 <Drenfong.Wang@intel.com>
-rw-r--r--README.md1
-rw-r--r--src/CMakeLists.txt2
-rw-r--r--src/plugins/CMakeLists.txt6
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
#########