mirror of
https://github.com/varun-r-mallya/pylibbpf.git
synced 2026-02-10 07:00:55 +00:00
get compiling
This commit is contained in:
@ -24,9 +24,11 @@ add_custom_target(libbpf_build ALL DEPENDS ${LIBBPF_A})
|
|||||||
add_library(libbpf_static STATIC IMPORTED GLOBAL)
|
add_library(libbpf_static STATIC IMPORTED GLOBAL)
|
||||||
set_target_properties(
|
set_target_properties(
|
||||||
libbpf_static
|
libbpf_static
|
||||||
PROPERTIES IMPORTED_LOCATION ${LIBBPF_A}
|
PROPERTIES
|
||||||
INTERFACE_INCLUDE_DIRECTORIES
|
IMPORTED_LOCATION ${LIBBPF_A}
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/libbpf/include)
|
INTERFACE_INCLUDE_DIRECTORIES
|
||||||
|
"${CMAKE_CURRENT_SOURCE_DIR}/libbpf/include;${CMAKE_CURRENT_SOURCE_DIR}/libbpf/src"
|
||||||
|
)
|
||||||
|
|
||||||
add_dependencies(libbpf_static libbpf_build)
|
add_dependencies(libbpf_static libbpf_build)
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
#define MACRO_STRINGIFY(x) STRINGIFY(x)
|
#define MACRO_STRINGIFY(x) STRINGIFY(x)
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include "bpf/libbpf.h"
|
#include "libbpf.h"
|
||||||
}
|
}
|
||||||
|
|
||||||
int add(int i, int j) {
|
int add(int i, int j) {
|
||||||
|
|||||||
Reference in New Issue
Block a user