1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-14 22:51:11 +02:00

🎉 Added cmake target for building manpage with scdoc

Signed-off-by: Edgar <Edgar@AnotherFoxGuy.com>
This commit is contained in:
Edgar
2021-07-24 12:53:23 +00:00
parent 31fbfeec52
commit 5b308e2568
3 changed files with 31 additions and 2 deletions

View File

@@ -1,3 +1,4 @@
include( CMakeDependentOption )
set( TARGET manual )
set( TARGET_ROOT ${topdir}/manual )
@@ -52,9 +53,25 @@ if( NOT CMAKE_SYSTEM_NAME MATCHES "Darwin" )
if( NOT WIN32)
install( DIRECTORY "${dst}" OPTIONAL
DESTINATION "${_DATADIR}/tenacity/help" )
install( FILES "${_SRCDIR}/tenacity.1"
DESTINATION "${_MANDIR}/man1" )
install( FILES "${_SRCDIR}/tenacity.appdata.xml"
DESTINATION "${_DATADIR}/metainfo" )
endif()
endif()
# Test if scdoc is installed
find_program(SCDOC_CMD scdoc)
cmake_dependent_option(BUILD_MANPAGE "Build manpage" ON "NOT SCDOC_CMD STREQUAL SCDOC_CMD-NOTFOUND" OFF)
if( BUILD_MANPAGE )
add_custom_command( COMMENT "Generating manpage"
COMMAND ${SCDOC_CMD} < "${_SRCDIR}/tenacity.1.scd" > "${CMAKE_BINARY_DIR}/help/tenacity.1"
DEPENDS "${_SRCDIR}/tenacity.1.scd"
OUTPUT "${CMAKE_BINARY_DIR}/help/tenacity.1" )
add_custom_target( gen_manpage ALL DEPENDS "${CMAKE_BINARY_DIR}/help/tenacity.1")
install( FILES "${CMAKE_BINARY_DIR}/help/tenacity.1"
DESTINATION "${_MANDIR}/man1" )
endif()