summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake')
-rw-r--r--cmake/Modules/BuildMacros.cmake1
-rw-r--r--cmake/Modules/FindHicnBinaryApi.cmake31
-rw-r--r--cmake/Modules/FindHicnPlugin.cmake5
-rw-r--r--cmake/Modules/FindVpp.cmake18
4 files changed, 20 insertions, 35 deletions
diff --git a/cmake/Modules/BuildMacros.cmake b/cmake/Modules/BuildMacros.cmake
index 8b591d05b..f89902dbc 100644
--- a/cmake/Modules/BuildMacros.cmake
+++ b/cmake/Modules/BuildMacros.cmake
@@ -37,6 +37,7 @@ macro(build_executable exec)
ARCHIVE_OUTPUT_DIRECTORY "${BUILD_ROOT}/lib"
LIBRARY_OUTPUT_DIRECTORY "${BUILD_ROOT}/lib"
RUNTIME_OUTPUT_DIRECTORY "${BUILD_ROOT}/bin"
+ LINK_FLAGS "-Wl,-unresolved-symbols=ignore-in-shared-libs"
)
if(ARG_LINK_LIBRARIES)
diff --git a/cmake/Modules/FindHicnBinaryApi.cmake b/cmake/Modules/FindHicnBinaryApi.cmake
deleted file mode 100644
index 86a96ea19..000000000
--- a/cmake/Modules/FindHicnBinaryApi.cmake
+++ /dev/null
@@ -1,31 +0,0 @@
-# Copyright (c) 2017-2019 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-set(HICN_BINARY_API_SEARCH_PATH_LIST
- ${HICN_BINARY_API_HOME}
- $ENV{HICN_BINARY_API_HOME}
- /usr/local
- /opt
- /usr
-)
-
-find_path(HICN_BINARY_API_INCLUDE_DIR vpp_plugins/hicn/hicn_api.h
- HINTS ${VPP_SEARCH_PATH_LIST}
- PATH_SUFFIXES include
- DOC "Find the VPP includes"
-)
-
-set(HICN_BINARY_API_INCLUDE_DIRS ${VPP_INCLUDE_DIR})
-
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(HicnBinaryApi DEFAULT_MSG VPP_LIBRARIES VPP_INCLUDE_DIRS) \ No newline at end of file
diff --git a/cmake/Modules/FindHicnPlugin.cmake b/cmake/Modules/FindHicnPlugin.cmake
index b9d1b1099..0e67e22d8 100644
--- a/cmake/Modules/FindHicnPlugin.cmake
+++ b/cmake/Modules/FindHicnPlugin.cmake
@@ -12,6 +12,7 @@
# limitations under the License.
set(HICNPLUGIN_SEARCH_PATH_LIST
+ ${VPP_SEARCH_PATH_LIST}
${HICNPLUGIN_HOME}
$ENV{HICNPLUGIN_HOME}
/usr/local
@@ -26,9 +27,9 @@ find_path(HICNPLUGIN_INCLUDE_DIR vapi/hicn.api.vapi.h
)
-set(HICNPLUGIN_INCLUDE_DIRS ${HICNPLUGIN_INCLUDE_DIR})
+set(HICNPLUGIN_INCLUDE_DIRS ${HICNPLUGIN_INCLUDE_DIR} ${HICNPLUGIN_INCLUDE_DIR}/vpp_plugins)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(HicnPlugin DEFAULT_MSG HICNPLUGIN_INCLUDE_DIRS)
-mark_as_advanced(HICNPLUGIN_INCLUDE_DIR)
+mark_as_advanced(HICNPLUGIN_INCLUDE_DIR) \ No newline at end of file
diff --git a/cmake/Modules/FindVpp.cmake b/cmake/Modules/FindVpp.cmake
index d29f37339..4f8dba17a 100644
--- a/cmake/Modules/FindVpp.cmake
+++ b/cmake/Modules/FindVpp.cmake
@@ -71,10 +71,24 @@ find_library(VPP_LIBRARY_VPPAPICLIENT
NAMES vppapiclient
HINTS ${VPP_SEARCH_PATH_LIST}
PATH_SUFFIXES lib lib64
- DOC "Find the Vpp vlib library"
+ DOC "Find the Vpp api library"
+)
+
+find_library(VPP_LIBRARY_VAPICLIENT
+ NAMES vapiclient
+ HINTS ${VPP_SEARCH_PATH_LIST}
+ PATH_SUFFIXES lib lib64
+ DOC "Find the Vpp vapi library"
+)
+
+find_library(VPP_LIBRARY_VLIBMEMORY
+ NAMES vlibmemory
+ HINTS ${VPP_SEARCH_PATH_LIST}
+ PATH_SUFFIXES lib lib64
+ DOC "Find the Vpp vlibmemory library"
)
-set(VPP_LIBRARIES ${VPP_LIBRARY_MEMORYCLIENT} ${VPP_LIBRARY_SVM} ${VPP_LIBRARY_INFRA} ${VPP_LIBRARY_VATPLUGIN} ${VPP_LIBRARY_VLIB} ${VPP_LIBRARY_VNET})
+set(VPP_LIBRARIES ${VPP_LIBRARY_MEMORYCLIENT} ${VPP_LIBRARY_SVM} ${VPP_LIBRARY_INFRA} ${VPP_LIBRARY_VATPLUGIN} ${VPP_LIBRARY_VLIB} ${VPP_LIBRARY_VNET} ${VPP_LIBRARY_VAPICLIENT} ${VPP_LIBRARY_VLIBMEMORY})
set(VPP_INCLUDE_DIRS ${VPP_INCLUDE_DIR} ${VPP_INCLUDE_DIR}/vpp_plugins)
include(FindPackageHandleStandardArgs)