diff --git a/CMakeLists.txt b/CMakeLists.txt index 0b914a3e7969509426ac461878fcccf912725009..b6f8cd874bd6ccb3b43bcfe992e589fb78b63101 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -62,6 +62,8 @@ set(SOURCE ripper.c ) +configure_file(syncterm.man.in syncterm.man) +file(ARCHIVE_CREATE OUTPUT syncterm.1.gz FORMAT raw COMPRESSION GZip PATHS syncterm.man) add_executable(syncterm ${SOURCE}) target_link_libraries(syncterm cryptlib xpdevplus) target_include_directories(syncterm PRIVATE ${CMAKE_BINARY_DIR}) @@ -79,8 +81,9 @@ if(NOT HAS_FORKPTY) target_compile_definitions(syncterm PRIVATE NEEDS_DAEMON) endif() -install(TARGETS syncterm DESTINATION bin) +install(TARGETS syncterm RUNTIME) if(UNIX) install(FILES syncterm.desktop DESTINATION share/applications) install(FILES syncterm.png DESTINATION share/icons/hicolor/64x64/apps) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/syncterm.1.gz DESTINATION man/man1) endif() diff --git a/syncterm.man.in b/syncterm.man.in index 0bfcc6bfdd7e76845254cc1575b2adcdae904142..4e03286006773b7139b46cca1b8db0896576e586 100644 --- a/syncterm.man.in +++ b/syncterm.man.in @@ -130,7 +130,7 @@ The curses and ANSI modes are not necessarily the correct number of lines for a traditional screen mode. As such, filler will be added around the terminal screen. For some display sizes, unpredictable results may occur. .SH FILES -.IP \fC%%DESTDIR%%%%PREFIX%%/etc/syncterm.lst\fR +.IP \fC@DESTDIR@@CMAKE_INSTALL_PREFIX@/etc/syncterm.lst\fR The system wide dialing directory. .IP \fC~/.syncterm/syncterm.lst\fR The users dialing directory