mirror of
https://github.com/springzfx/cgproxy.git
synced 2026-01-07 13:07:56 +08:00
- CMAKE_INSTALL_XX and CMAKE_INSTALL_FULL_XX result the same effect in intall(...), so why not use CMAKE_INSTALL_FULL_XX directly - install systemd service to fixed /usr/lib/ path, according to the systemd unit doc
16 lines
499 B
CMake
16 lines
499 B
CMake
# find libbpf
|
|
if (build_static)
|
|
find_library(LIBBPF libbpf.a REQUIRED)
|
|
else()
|
|
find_library(LIBBPF bpf REQUIRED)
|
|
endif()
|
|
|
|
if (build_execsnoop_dl)
|
|
add_library(execsnoop MODULE execsnoop_share.cpp)
|
|
install(TARGETS execsnoop DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR}/cgproxy/)
|
|
target_link_libraries(execsnoop PRIVATE ${LIBBPF} -lelf -lz)
|
|
else()
|
|
add_library(execsnoop STATIC execsnoop_share.cpp)
|
|
target_link_libraries(execsnoop PRIVATE ${LIBBPF} -l:libelf.a -l:libz.a)
|
|
endif()
|