From 844e2af15716148a62c985b2cec7c1dc1c5c3b7b Mon Sep 17 00:00:00 2001 From: aneejit1 Date: Tue, 9 Jun 2020 21:19:25 +0000 Subject: [PATCH] Amend man/CMakeLists.txt to prevent writes to the man3 source directory This resolves bug 3122. Signed-off-by: aneejit1 (cherry picked from commit 399b515c4522ef9dd2ed43bfa3914f77b697f281) --- man/CMakeLists.txt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/man/CMakeLists.txt b/man/CMakeLists.txt index 599ee96..589da60 100644 --- a/man/CMakeLists.txt +++ b/man/CMakeLists.txt @@ -9,18 +9,19 @@ # ################################################# +file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/man3) -add_custom_target( man ALL DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/man3 ) +add_custom_target( man ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/man3 ) add_custom_command( - OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/man3 + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/man3 COMMAND doxygen ../doc/libr.cfg - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMENT "Generate manpages" ) install( - DIRECTORY man3 + DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/man3 DESTINATION ${MAN_INSTALL_DIR} PATTERN "_*" EXCLUDE )