From c381b15d4d3490fbd03f2f8f01276fd940aff91e Mon Sep 17 00:00:00 2001 From: Richard Shaw Date: Thu, 7 Aug 2025 21:44:51 -0500 Subject: [PATCH] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild --- CMakeLists.txt | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1697ae8..bd0cca4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,8 +1,9 @@ +cmake_minimum_required(VERSION 3.5...4.0) + project(chunkfs LANGUAGES C ) -cmake_minimum_required(VERSION 3.0) set(VERSION 0.8) add_definitions(-DVERSION="${VERSION}") @@ -29,11 +30,30 @@ add_executable(unchunkfs target_link_libraries(unchunkfs fuse) -add_custom_target(manpage ALL) +# Define the manpage output file +set(MANPAGE_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/chunkfs.1") -add_custom_command(TARGET manpage - COMMAND pod2man -c '' -n CHUNKFS -r 'ChunkFS ${VERSION}' -s 1 ${CMAKE_SOURCE_DIR}/manpage.pod chunkfs.1 - ) +# Custom command to generate the manpage +add_custom_command( + OUTPUT ${MANPAGE_OUTPUT} + COMMAND pod2man + --center="" + --name="CHUNKFS" + --release="ChunkFS ${VERSION}" + --section=1 + "${CMAKE_SOURCE_DIR}/manpage.pod" + "${MANPAGE_OUTPUT}" + DEPENDS "${CMAKE_SOURCE_DIR}/manpage.pod" + COMMENT "Generating chunkfs.1 manpage" + VERBATIM +) + +# Custom target to depend on the manpage output +add_custom_target( + manpage + ALL + DEPENDS ${MANPAGE_OUTPUT} +) execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink chunkfs.1 unchunkfs.1 WORKING_DIRECTORY ${CMAKE_BINARY_DIR})