Skip to content

Commit

Permalink
Merge pull request #220 from Smattr/smattr/b06d1284-3fb1-41f7-8966-ed…
Browse files Browse the repository at this point in the history
…691fa32f87

Fail gracefully during configuration if 'scdoc' is missing
  • Loading branch information
ReimuNotMoe authored Feb 5, 2024
2 parents 445c5ec + a08bd53 commit 730cf49
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion manpage/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
find_program(SCDOC scdoc)
if(NOT SCDOC)
message(FATAL_ERROR "scdoc not found")
endif()

function(man_page section page)
set(src "${CMAKE_CURRENT_SOURCE_DIR}/${page}.${section}.scd")
set(bin "${CMAKE_CURRENT_BINARY_DIR}/${page}.${section}")
add_custom_target(${page}.${section} ALL COMMAND scdoc < ${src} > ${bin})
add_custom_target(${page}.${section} ALL COMMAND ${SCDOC} < ${src} > ${bin})
install(FILES ${bin} DESTINATION ${CMAKE_INSTALL_MANDIR}/man${section}/)
endfunction(man_page)

Expand Down

0 comments on commit 730cf49

Please sign in to comment.