summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cmake/library.cmake9
-rw-r--r--src/cmake/plugin.cmake1
-rw-r--r--src/plugins/af_xdp/CMakeLists.txt2
-rw-r--r--src/plugins/crypto_ipsecmb/CMakeLists.txt4
-rw-r--r--src/plugins/dpdk/CMakeLists.txt2
-rw-r--r--src/plugins/linux-cp/CMakeLists.txt2
-rw-r--r--src/plugins/quic/CMakeLists.txt10
-rw-r--r--src/plugins/rdma/CMakeLists.txt2
-rw-r--r--src/plugins/tlsmbedtls/CMakeLists.txt2
-rw-r--r--src/plugins/tlspicotls/CMakeLists.txt8
-rw-r--r--src/vlib/CMakeLists.txt4
11 files changed, 28 insertions, 18 deletions
diff --git a/src/cmake/library.cmake b/src/cmake/library.cmake
index 37239f3d680..5a7d2cdfef7 100644
--- a/src/cmake/library.cmake
+++ b/src/cmake/library.cmake
@@ -136,3 +136,12 @@ macro(add_vpp_test_library lib)
# )
endforeach()
endmacro()
+
+macro(vpp_find_library var)
+ find_library(${var} ${ARGN})
+ mark_as_advanced(${var})
+endmacro()
+macro(vpp_find_path var)
+ find_path(${var} ${ARGN})
+ mark_as_advanced(${var})
+endmacro()
diff --git a/src/cmake/plugin.cmake b/src/cmake/plugin.cmake
index 9b0383f583d..536ae9c318a 100644
--- a/src/cmake/plugin.cmake
+++ b/src/cmake/plugin.cmake
@@ -115,6 +115,7 @@ endmacro()
macro(vpp_plugin_find_library plugin var name)
find_library(${var} NAMES ${name} ${ARGN})
+ mark_as_advanced(${var})
if (NOT ${var})
message(WARNING "-- ${name} library not found - ${plugin} plugin disabled")
return()
diff --git a/src/plugins/af_xdp/CMakeLists.txt b/src/plugins/af_xdp/CMakeLists.txt
index a56f250646c..cbe96aa59dd 100644
--- a/src/plugins/af_xdp/CMakeLists.txt
+++ b/src/plugins/af_xdp/CMakeLists.txt
@@ -11,7 +11,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-find_path(BPF_INCLUDE_DIR NAMES bpf/xsk.h)
+vpp_find_path(BPF_INCLUDE_DIR NAMES bpf/xsk.h)
if (NOT BPF_INCLUDE_DIR)
message(WARNING "libbpf headers not found - af_xdp plugin disabled")
return()
diff --git a/src/plugins/crypto_ipsecmb/CMakeLists.txt b/src/plugins/crypto_ipsecmb/CMakeLists.txt
index 59bfe24e990..981a045262e 100644
--- a/src/plugins/crypto_ipsecmb/CMakeLists.txt
+++ b/src/plugins/crypto_ipsecmb/CMakeLists.txt
@@ -16,8 +16,8 @@ if(NOT CMAKE_SYSTEM_PROCESSOR MATCHES "amd64.*|x86_64.*|AMD64.*")
return()
endif()
-find_path(IPSECMB_INCLUDE_DIR NAMES intel-ipsec-mb.h HINTS ${IPSECMB_INCLUDE_DIR_HINT})
-find_library(IPSECMB_LIB NAMES libIPSec_MB.a HINTS ${IPSECMB_LIB_DIR_HINT})
+vpp_find_path(IPSECMB_INCLUDE_DIR NAMES intel-ipsec-mb.h HINTS ${IPSECMB_INCLUDE_DIR_HINT})
+vpp_find_library(IPSECMB_LIB NAMES libIPSec_MB.a HINTS ${IPSECMB_LIB_DIR_HINT})
if(IPSECMB_INCLUDE_DIR AND IPSECMB_LIB)
diff --git a/src/plugins/dpdk/CMakeLists.txt b/src/plugins/dpdk/CMakeLists.txt
index 8650841293e..386515e8eef 100644
--- a/src/plugins/dpdk/CMakeLists.txt
+++ b/src/plugins/dpdk/CMakeLists.txt
@@ -25,7 +25,7 @@ else()
##############################################################################
# Find lib and include files
##############################################################################
- find_path(DPDK_INCLUDE_DIR PATH_SUFFIXES dpdk NAMES rte_config.h)
+ vpp_find_path(DPDK_INCLUDE_DIR PATH_SUFFIXES dpdk NAMES rte_config.h)
vpp_plugin_find_library(dpdk DPDK_LIB "libdpdk.a")
if (NOT DPDK_INCLUDE_DIR)
diff --git a/src/plugins/linux-cp/CMakeLists.txt b/src/plugins/linux-cp/CMakeLists.txt
index 6b6ccb3d0b1..080f73ecce4 100644
--- a/src/plugins/linux-cp/CMakeLists.txt
+++ b/src/plugins/linux-cp/CMakeLists.txt
@@ -11,7 +11,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-find_path(LIBNL3_INCLUDE_DIR NAMES libnl3/netlink/route/link/vlan.h)
+vpp_find_path(LIBNL3_INCLUDE_DIR NAMES libnl3/netlink/route/link/vlan.h)
if (NOT LIBNL3_INCLUDE_DIR)
message(WARNING "-- libnl3 headers not found - linux-cp plugin disabled")
diff --git a/src/plugins/quic/CMakeLists.txt b/src/plugins/quic/CMakeLists.txt
index 044186b3ae6..7a121e5fa48 100644
--- a/src/plugins/quic/CMakeLists.txt
+++ b/src/plugins/quic/CMakeLists.txt
@@ -15,11 +15,11 @@
unset(QUIC_LINK_LIBRARIES)
set(EXPECTED_QUICLY_VERSION "0.1.3-vpp")
-find_path(QUICLY_INCLUDE_DIR NAMES quicly.h)
-find_path(PICOTLS_INCLUDE_DIR NAMES picotls.h)
-find_library (QUICLY_LIBRARY NAMES "libquicly.a")
-find_library (PICOTLS_CORE_LIBRARY NAMES "libpicotls-core.a")
-find_library (PICOTLS_OPENSSL_LIBRARY NAMES "libpicotls-openssl.a")
+vpp_find_path(QUICLY_INCLUDE_DIR NAMES quicly.h)
+vpp_find_path(PICOTLS_INCLUDE_DIR NAMES picotls.h)
+vpp_find_library(QUICLY_LIBRARY NAMES "libquicly.a")
+vpp_find_library(PICOTLS_CORE_LIBRARY NAMES "libpicotls-core.a")
+vpp_find_library(PICOTLS_OPENSSL_LIBRARY NAMES "libpicotls-openssl.a")
list(APPEND QUIC_LINK_LIBRARIES
${QUICLY_LIBRARY}
diff --git a/src/plugins/rdma/CMakeLists.txt b/src/plugins/rdma/CMakeLists.txt
index cc104f871c1..f598ff8c701 100644
--- a/src/plugins/rdma/CMakeLists.txt
+++ b/src/plugins/rdma/CMakeLists.txt
@@ -11,7 +11,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-find_path(IBVERBS_INCLUDE_DIR NAMES infiniband/verbs.h)
+vpp_find_path(IBVERBS_INCLUDE_DIR NAMES infiniband/verbs.h)
if (NOT IBVERBS_INCLUDE_DIR)
message(WARNING "-- rdma headers not found - rdma plugin disabled")
diff --git a/src/plugins/tlsmbedtls/CMakeLists.txt b/src/plugins/tlsmbedtls/CMakeLists.txt
index 96bc97df3f5..1accd7e37cb 100644
--- a/src/plugins/tlsmbedtls/CMakeLists.txt
+++ b/src/plugins/tlsmbedtls/CMakeLists.txt
@@ -11,7 +11,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-find_path(MBEDTLS_INCLUDE_DIR NAMES mbedtls/ssl.h)
+vpp_find_path(MBEDTLS_INCLUDE_DIR NAMES mbedtls/ssl.h)
if (NOT MBEDTLS_INCLUDE_DIR)
message(WARNING "-- mbedtls headers not found - tlsmbedtls plugin disabled")
diff --git a/src/plugins/tlspicotls/CMakeLists.txt b/src/plugins/tlspicotls/CMakeLists.txt
index baf4c69427d..64f607117d3 100644
--- a/src/plugins/tlspicotls/CMakeLists.txt
+++ b/src/plugins/tlspicotls/CMakeLists.txt
@@ -8,10 +8,10 @@ include (CheckFunctionExists)
set(EXPECTED_QUICLY_VERSION "0.1.3-vpp")
-find_path(QUICLY_INCLUDE_DIR NAMES quicly.h)
-find_path (PICOTLS_INCLUDE_DIR NAMES picotls.h)
-find_library (PICOTLS_CORE_LIBRARY NAMES "libpicotls-core.a")
-find_library (PICOTLS_OPENSSL_LIBRARY NAMES "libpicotls-openssl.a")
+vpp_find_path(QUICLY_INCLUDE_DIR NAMES quicly.h)
+vpp_find_path(PICOTLS_INCLUDE_DIR NAMES picotls.h)
+vpp_find_library(PICOTLS_CORE_LIBRARY NAMES "libpicotls-core.a")
+vpp_find_library(PICOTLS_OPENSSL_LIBRARY NAMES "libpicotls-openssl.a")
list (APPEND PICOTLS_LINK_LIBRARIES
${PICOTLS_CORE_LIBRARY}
diff --git a/src/vlib/CMakeLists.txt b/src/vlib/CMakeLists.txt
index 78fe936da9d..c8127fbe337 100644
--- a/src/vlib/CMakeLists.txt
+++ b/src/vlib/CMakeLists.txt
@@ -49,8 +49,8 @@ install(
# Find lib and include files
##############################################################################
message(STATUS "Looking for libuuid")
-find_path(UUID_INCLUDE_DIR NAMES uuid/uuid.h)
-find_library(UUID_LIB NAMES uuid)
+vpp_find_path(UUID_INCLUDE_DIR NAMES uuid/uuid.h)
+vpp_find_library(UUID_LIB NAMES uuid)
if(UUID_INCLUDE_DIR AND UUID_LIB)
include_directories(${UUID_INCLUDE_DIR})