From 4c259702b174dd139c5159316d22205bafdb1ac6 Mon Sep 17 00:00:00 2001 From: Jon Ringle Date: Sat, 22 Jun 2024 11:01:59 -0400 Subject: [PATCH] Fix install of man page When doing the normal build as: ``` mkdir build cd build cmake .. make sudo make install ``` The `sudo make install` will fail with: ``` CMake Error at cmake_install.cmake:70 (file): file INSTALL cannot find "/home/jringle/git/lsyncd/lsyncd/build/man/lsyncd.1": No such file or directory. ``` This is because the manpage target isn't built by default and the install requires it. --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e69cbc6..1fd427b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -89,11 +89,11 @@ add_custom_command( OUTPUT defaults.out ) # the manpage -add_custom_target( manpage +add_custom_target( manpage ALL COMMAND ${CMAKE_COMMAND} -E echo "Updating the manpage" COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/man COMMAND a2x --format=manpage ${PROJECT_SOURCE_DIR}/docs/manpage/lsyncd.1.txt -D ${CMAKE_CURRENT_BINARY_DIR}/man - DEPENDS docs/manpage/lsyncd.1.txt + DEPENDS ${CMAKE_SOURCE_DIR}/docs/manpage/lsyncd.1.txt ) # the html documention