mirror of
https://gitee.com/openharmony/third_party_nghttp2
synced 2024-11-27 01:50:28 +00:00
14 lines
567 B
CMake
14 lines
567 B
CMake
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()
|