Commit ad4ccdbb authored by louiz’'s avatar louiz’

Display a message to tell if we found pandoc or not

fix #3177
parent abedca19
...@@ -65,15 +65,20 @@ execute_process(COMMAND "date" "+%Y-%m-%d" OUTPUT_VARIABLE DOC_DATE ...@@ -65,15 +65,20 @@ execute_process(COMMAND "date" "+%Y-%m-%d" OUTPUT_VARIABLE DOC_DATE
OUTPUT_STRIP_TRAILING_WHITESPACE) OUTPUT_STRIP_TRAILING_WHITESPACE)
set(MAN_PAGE ${CMAKE_CURRENT_BINARY_DIR}/doc/${PROJECT_NAME}.1) set(MAN_PAGE ${CMAKE_CURRENT_BINARY_DIR}/doc/${PROJECT_NAME}.1)
set(DOC_PAGE ${CMAKE_CURRENT_SOURCE_DIR}/doc/${PROJECT_NAME}.1.rst) set(DOC_PAGE ${CMAKE_CURRENT_SOURCE_DIR}/doc/${PROJECT_NAME}.1.rst)
find_program(PANDOC_EXECUTABLE NAMES pandoc if (NOT PANDOC_EXECUTABLE)
DOC "The pandoc software, to build the man page from the rst documentation") find_program(PANDOC_EXECUTABLE NAMES pandoc
if(PANDOC_EXECUTABLE) DOC "The pandoc software, to build the man page from the rst documentation")
set(WITH_DOC true) if(PANDOC_EXECUTABLE)
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc/) message(STATUS "Found Pandoc: ${PANDOC_EXECUTABLE}")
add_custom_command(OUTPUT ${MAN_PAGE} set(WITH_DOC true)
COMMAND ${PANDOC_EXECUTABLE} -M date="${DOC_DATE}" -s -t man ${DOC_PAGE} -o ${MAN_PAGE} file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc/)
DEPENDS ${DOC_PAGE}) add_custom_command(OUTPUT ${MAN_PAGE}
add_custom_target(doc ALL DEPENDS ${MAN_PAGE}) COMMAND ${PANDOC_EXECUTABLE} -M date="${DOC_DATE}" -s -t man ${DOC_PAGE} -o ${MAN_PAGE}
DEPENDS ${DOC_PAGE})
add_custom_target(doc ALL DEPENDS ${MAN_PAGE})
else()
message(STATUS "Pandoc not found, documentation cannot be built")
endif()
endif() endif()
# Look for litesql and enable the database if found # Look for litesql and enable the database if found
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment