diff --git a/CMakeLists.txt b/CMakeLists.txt index e8eca48..6bf7d64 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -34,7 +34,19 @@ target_link_libraries(igmpgen ${LIBNET_LIBRARY}) install(TARGETS igmpgen DESTINATION bin) # Install the man page -install(FILES misc/igmpgen.man.1 DESTINATION share/man/man1 RENAME igmpgen.1) +include(GNUInstallDirs) +file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/misc/) +file( + ARCHIVE_CREATE + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/misc/igmpgen.1.gz + PATHS ${CMAKE_CURRENT_SOURCE_DIR}/misc/igmpgen.man.1 + FORMAT raw + COMPRESSION GZip +) +install( + FILES ${CMAKE_CURRENT_BINARY_DIR}/misc/igmpgen.1.gz + TYPE MAN +) # Include CPack for packaging include(InstallRequiredSystemLibraries)