diff --git a/driver/bpf/CMakeLists.txt b/driver/bpf/CMakeLists.txt index b3e4a06e0b..82e811c2de 100644 --- a/driver/bpf/CMakeLists.txt +++ b/driver/bpf/CMakeLists.txt @@ -5,7 +5,7 @@ # MIT.txt or GPL.txt for full copies of the license. # -configure_file(../driver_config.h.in ${CMAKE_CURRENT_SOURCE_DIR}/../driver_config.h) +configure_file(../driver_config.h.in ${CMAKE_CURRENT_BINARY_DIR}/driver_config.h) option(BUILD_BPF "Build the BPF driver on Linux" OFF) @@ -28,6 +28,7 @@ endif() install(FILES bpf_helpers.h builtins.h + driver_config.h filler_helpers.h fillers.h Makefile diff --git a/driver/bpf/probe.c b/driver/bpf/probe.c index 678119f21a..a1739094ca 100644 --- a/driver/bpf/probe.c +++ b/driver/bpf/probe.c @@ -15,7 +15,7 @@ or GPL2.txt for full copies of the license. #endif #include -#include "../driver_config.h" +#include "driver_config.h" #include "../ppm_events_public.h" #include "bpf_helpers.h" #include "types.h" diff --git a/driver/modern_bpf/CMakeLists.txt b/driver/modern_bpf/CMakeLists.txt index 5215e10aee..0813f70269 100644 --- a/driver/modern_bpf/CMakeLists.txt +++ b/driver/modern_bpf/CMakeLists.txt @@ -47,7 +47,7 @@ if(RESULT STREQUAL NOTFOUND) message(FATAL_ERROR "${MODERN_BPF_LOG_PREFIX} problem with compute_versions.cmake in ${CMAKE_MODULE_PATH}") endif() compute_versions(../API_VERSION ../SCHEMA_VERSION) -configure_file(../driver_config.h.in ${CMAKE_CURRENT_SOURCE_DIR}/../driver_config.h) +configure_file(../driver_config.h.in ${CMAKE_CURRENT_BINARY_DIR}/driver/driver_config.h) ######################## # Check clang version. @@ -211,6 +211,7 @@ list(APPEND CLANG_FLAGS -I${LIBBPF_INCLUDE} ${MODERN_PROBE_INCLUDE} -I${PPM_INCLUDE} + -I${CMAKE_CURRENT_BINARY_DIR} -isystem )