aboutsummaryrefslogtreecommitdiffstats
path: root/hicn-plugin
diff options
context:
space:
mode:
Diffstat (limited to 'hicn-plugin')
-rw-r--r--hicn-plugin/CMakeLists.txt24
-rw-r--r--hicn-plugin/src/CMakeLists.txt25
-rw-r--r--hicn-plugin/vapi/CMakeLists.txt10
3 files changed, 26 insertions, 33 deletions
diff --git a/hicn-plugin/CMakeLists.txt b/hicn-plugin/CMakeLists.txt
index d0781e8fa..038426838 100644
--- a/hicn-plugin/CMakeLists.txt
+++ b/hicn-plugin/CMakeLists.txt
@@ -13,6 +13,30 @@
cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
+project(hicn-plugin)
+
+include(GNUInstallDirs)
+
+set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH}
+ "${CMAKE_CURRENT_SOURCE_DIR}/../cmake/Modules/"
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules/"
+)
+include(BuildMacros)
+
+set (CMAKE_CXX_STANDARD 11)
+set (CMAKE_C_STANDARD 11)
+
+# Check for memfd_create syscall
+include(CheckSymbolExists)
+CHECK_SYMBOL_EXISTS ( "__NR_memfd_create" "sys/syscall.h" HAVE_MEMFD_CREATE )
+if ( HAVE_MEMFD_CREATE )
+ add_definitions ( -DHAVE_MEMFD_CREATE )
+endif()
+
+set(HICN_PLUGIN hicn-plugin CACHE INTERNAL "" FORCE)
+
+include (Packaging)
+
add_subdirectory(src)
add_subdirectory(vapi) \ No newline at end of file
diff --git a/hicn-plugin/src/CMakeLists.txt b/hicn-plugin/src/CMakeLists.txt
index 0f2debcb9..3e9b8f6d1 100644
--- a/hicn-plugin/src/CMakeLists.txt
+++ b/hicn-plugin/src/CMakeLists.txt
@@ -12,29 +12,6 @@
# limitations under the License.
cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
-project(hicn-plugin)
-
-include(GNUInstallDirs)
-
-set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH}
- "${CMAKE_CURRENT_SOURCE_DIR}/../../cmake/Modules/"
- "${CMAKE_CURRENT_SOURCE_DIR}/../cmake/Modules/"
-)
-include(BuildMacros)
-
-set (CMAKE_CXX_STANDARD 11)
-set (CMAKE_C_STANDARD 11)
-
-# Check for memfd_create syscall
-include(CheckSymbolExists)
-CHECK_SYMBOL_EXISTS ( "__NR_memfd_create" "sys/syscall.h" HAVE_MEMFD_CREATE )
-if ( HAVE_MEMFD_CREATE )
- add_definitions ( -DHAVE_MEMFD_CREATE )
-endif()
-
-set(${HICN_PLUGIN}-dev hicn-plugin CACHE INTERNAL "" FORCE SCOPE PARENT)
-
-include (Packaging)
# Dependencies
@@ -283,6 +260,8 @@ set_target_properties(hicn_api_test_plugin
LINKER_LANGUAGE C
PREFIX "")
+message (STATUS "hicn-plugin variable ${HICN_PLUGIN}")
+
install(DIRECTORY
DESTINATION ${VPP_INSTALL_PLUGIN}
COMPONENT ${HICN_PLUGIN})
diff --git a/hicn-plugin/vapi/CMakeLists.txt b/hicn-plugin/vapi/CMakeLists.txt
index 4b33cd258..03fd489ca 100644
--- a/hicn-plugin/vapi/CMakeLists.txt
+++ b/hicn-plugin/vapi/CMakeLists.txt
@@ -16,16 +16,6 @@ set(SAFE_VAPI safe_vapi CACHE INTERNAL "" FORCE)
set(SAFE_VAPI_SHARED ${SAFE_VAPI}.shared CACHE INTERNAL "" FORCE)
set(SAFE_VAPI_STATIC ${SAFE_VAPI}.static CACHE INTERNAL "" FORCE)
-project(${SAFE_VAPI})
-
-set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH}
- "${CMAKE_CURRENT_SOURCE_DIR}/../../cmake/Modules/"
- "${CMAKE_CURRENT_SOURCE_DIR}/../cmake/Modules/"
-)
-
-include (Packaging)
-include (BuildMacros)
-
# Dependencies
find_package(Vpp REQUIRED)