xref: /aosp_15_r20/external/bcc/man/man8/CMakeLists.txt (revision 387f9dfdfa2baef462e92476d413c7bc2470293e)
1*387f9dfdSAndroid Build Coastguard Workerfind_program(GZIP gzip)
2*387f9dfdSAndroid Build Coastguard Workerfile(GLOB FILES *.8)
3*387f9dfdSAndroid Build Coastguard Workerset(GZFILES "")
4*387f9dfdSAndroid Build Coastguard Workerforeach(FIL ${FILES})
5*387f9dfdSAndroid Build Coastguard Worker  get_filename_component(NAME ${FIL} NAME)
6*387f9dfdSAndroid Build Coastguard Worker  add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${NAME}.gz
7*387f9dfdSAndroid Build Coastguard Worker    COMMAND ${GZIP} -c ${FIL} > ${CMAKE_CURRENT_BINARY_DIR}/${NAME}.gz
8*387f9dfdSAndroid Build Coastguard Worker    DEPENDS ${FIL})
9*387f9dfdSAndroid Build Coastguard Worker  list(APPEND GZFILES "${CMAKE_CURRENT_BINARY_DIR}/${NAME}.gz")
10*387f9dfdSAndroid Build Coastguard Workerendforeach()
11*387f9dfdSAndroid Build Coastguard Workeradd_custom_target(man ALL DEPENDS ${GZFILES})
12*387f9dfdSAndroid Build Coastguard Workerinstall(FILES ${GZFILES} DESTINATION share/bcc/man/man8)
13