mirror of
https://github.com/Sude-/lgogdownloader.git
synced 2024-11-20 11:49:17 +01:00
21 lines
673 B
CMake
21 lines
673 B
CMake
find_program(GZIP gzip DOC "Location of the gzip program")
|
|
mark_as_advanced(GZIP)
|
|
|
|
include(GNUInstallDirs)
|
|
|
|
if(GZIP)
|
|
set(MAN_PAGE "${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}.1")
|
|
set(MAN_FILE "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.1.gz")
|
|
add_custom_command(
|
|
OUTPUT ${MAN_FILE}
|
|
COMMAND ${GZIP} -c -9 ${MAN_PAGE} > ${MAN_FILE}
|
|
MAIN_DEPENDENCY ${MAN_PAGE}
|
|
COMMENT "Building man page"
|
|
VERBATIM
|
|
)
|
|
add_custom_target(manpage ALL DEPENDS ${MAN_FILE} ${PROJECT_NAME})
|
|
install(FILES ${MAN_FILE} DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
|
|
else(GZIP)
|
|
message("WARNING: One of the following is missing: gzip; man page will not be generated")
|
|
endif(GZIP)
|