Commit 75c41dd6 authored by Brendan Gregg's avatar Brendan Gregg Committed by GitHub

Merge pull request #120 from iovisor/make-install

add make install target
parents 829aa484 fa07ef15
......@@ -72,3 +72,5 @@ add_subdirectory(src/ast)
add_subdirectory(src)
add_subdirectory(tests)
add_subdirectory(resources)
add_subdirectory(tools)
add_subdirectory(man)
add_subdirectory(man8)
find_program(GZIP gzip)
file(GLOB FILES *.8)
set(GZFILES "")
foreach(FIL ${FILES})
get_filename_component(NAME ${FIL} NAME)
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${NAME}.gz
COMMAND ${GZIP} -c ${FIL} > ${CMAKE_CURRENT_BINARY_DIR}/${NAME}.gz
DEPENDS ${FIL})
list(APPEND GZFILES "${CMAKE_CURRENT_BINARY_DIR}/${NAME}.gz")
endforeach()
add_custom_target(man ALL DEPENDS ${GZFILES})
install(FILES ${GZFILES} DESTINATION man/man8)
......@@ -21,3 +21,5 @@ target_link_libraries(bpftrace ${binary_dir}/src/cc/libbpf.a)
target_link_libraries(bpftrace ${binary_dir}/src/cc/libbcc-loader-static.a)
target_link_libraries(bpftrace ${binary_dir}/src/cc/libbcc.a)
target_link_libraries(bpftrace ${LIBELF_LIBRARIES})
install(TARGETS bpftrace DESTINATION bin)
file(GLOB BT_FILES *.bt)
install(FILES ${BT_FILES} DESTINATION share/bpftrace/tools)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment