summaryrefslogtreecommitdiffstats
path: root/bpf/CMakeLists.txt
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-10 19:37:08 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-10 19:37:08 +0000
commitd710a65c8b50bc3d4d0920dc6e865296f42edd5e (patch)
treed3bf9843448af9398b55f49a50a194bbaacd724e /bpf/CMakeLists.txt
parentInitial commit. (diff)
downloadnghttp2-d710a65c8b50bc3d4d0920dc6e865296f42edd5e.tar.xz
nghttp2-d710a65c8b50bc3d4d0920dc6e865296f42edd5e.zip
Adding upstream version 1.59.0.upstream/1.59.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'bpf/CMakeLists.txt')
-rw-r--r--bpf/CMakeLists.txt13
1 files changed, 13 insertions, 0 deletions
diff --git a/bpf/CMakeLists.txt b/bpf/CMakeLists.txt
new file mode 100644
index 0000000..904b821
--- /dev/null
+++ b/bpf/CMakeLists.txt
@@ -0,0 +1,13 @@
+if(LIBBPF_FOUND)
+ add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/reuseport_kern.o"
+ COMMAND ${CMAKE_C_COMPILER} ${BPFCFLAGS} ${EXTRABPFCFLAGS} -I${LIBBPF_INCLUDE_DIRS} -target bpf -c reuseport_kern.c -o "${CMAKE_CURRENT_BINARY_DIR}/reuseport_kern.o"
+ WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
+ VERBATIM)
+
+ add_custom_target(bpf ALL
+ DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/reuseport_kern.o"
+ VERBATIM)
+
+ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/reuseport_kern.o"
+ DESTINATION "${CMAKE_INSTALL_LIBDIR}/${CMAKE_PROJECT_NAME}")
+endif()