mirror of
https://github.com/h3xduck/TripleCross.git
synced 2025-12-22 09:43:07 +08:00
Setup development environment with libbpf
This commit is contained in:
32
external/libbpf-bootstrap/tools/cmake/FindLibBpf.cmake
vendored
Normal file
32
external/libbpf-bootstrap/tools/cmake/FindLibBpf.cmake
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
# SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
|
||||
|
||||
find_path(LIBBPF_INCLUDE_DIRS
|
||||
NAMES
|
||||
bpf/bpf.h
|
||||
bpf/btf.h
|
||||
bpf/libbpf.h
|
||||
PATHS
|
||||
/usr/include
|
||||
/usr/local/include
|
||||
/opt/local/include
|
||||
/sw/include
|
||||
ENV CPATH)
|
||||
|
||||
find_library(LIBBPF_LIBRARIES
|
||||
NAMES
|
||||
bpf
|
||||
PATHS
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
/opt/local/lib
|
||||
/sw/lib
|
||||
ENV LIBRARY_PATH
|
||||
ENV LD_LIBRARY_PATH)
|
||||
|
||||
include (FindPackageHandleStandardArgs)
|
||||
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibBpf "Please install the libbpf development package"
|
||||
LIBBPF_LIBRARIES
|
||||
LIBBPF_INCLUDE_DIRS)
|
||||
|
||||
mark_as_advanced(LIBBPF_INCLUDE_DIRS LIBBPF_LIBRARIES)
|
||||
Reference in New Issue
Block a user