From 4da2257758df7814a7eb7b6ce6494cde6d2789f6 Mon Sep 17 00:00:00 2001 From: Axel Kittenberger Date: Tue, 29 Apr 2014 16:38:25 +0200 Subject: [PATCH] adding install targets and reenabling the manpage stuff --- .gitignore | 1 + CMakeLists.txt | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/.gitignore b/.gitignore index 0cec646..cc17fa8 100644 --- a/.gitignore +++ b/.gitignore @@ -14,6 +14,7 @@ build/ CMakeCache.txt CMakeFiles/ cmake_install.cmake +install_manifest.txt # generated C code diff --git a/CMakeLists.txt b/CMakeLists.txt index 2fc6bd6..0ca98cf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -79,7 +79,17 @@ add_custom_command( OUTPUT defaults.out DEPENDS ${DEFAULT_CONFIGS} ) +# the manpage +add_custom_command( OUTPUT doc/lsyncd.1 + COMMAND ${CMAKE_COMMAND} -E echo "Updating the manpage" + COMMAND a2x --format=manpage doc/lsyncd.1.txt + DEPENDS doc/lsyncd.1.txt +) +add_custom_target( manpage ALL DEPENDS doc/lsyncd.1 ) # compiling and linking it all together add_executable( lsyncd ${LSYNCD_SRC} ) target_link_libraries( lsyncd ${LUA_LIBRARIES} ) + +install( TARGETS lsyncd RUNTIME DESTINATION bin ) +install( FILES doc/lsyncd.1 DESTINATION man)