summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlouiz’ <louiz@louiz.org>2016-06-13 16:41:02 +0200
committerlouiz’ <louiz@louiz.org>2016-06-13 20:02:04 +0200
commitad4ccdbbea129cfbab89773bea040d4149afcb2d (patch)
treee9ac4ce352427624973a48274b65110265bc35e2
parentabedca196fffb5904f2b01fc0237600fe939168a (diff)
downloadbiboumi-ad4ccdbbea129cfbab89773bea040d4149afcb2d.tar.gz
biboumi-ad4ccdbbea129cfbab89773bea040d4149afcb2d.tar.bz2
biboumi-ad4ccdbbea129cfbab89773bea040d4149afcb2d.tar.xz
biboumi-ad4ccdbbea129cfbab89773bea040d4149afcb2d.zip
Display a message to tell if we found pandoc or not
fix #3177
-rw-r--r--CMakeLists.txt23
1 files changed, 14 insertions, 9 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4559201..dc3a707 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -65,15 +65,20 @@ execute_process(COMMAND "date" "+%Y-%m-%d" OUTPUT_VARIABLE DOC_DATE
OUTPUT_STRIP_TRAILING_WHITESPACE)
set(MAN_PAGE ${CMAKE_CURRENT_BINARY_DIR}/doc/${PROJECT_NAME}.1)
set(DOC_PAGE ${CMAKE_CURRENT_SOURCE_DIR}/doc/${PROJECT_NAME}.1.rst)
-find_program(PANDOC_EXECUTABLE NAMES pandoc
- DOC "The pandoc software, to build the man page from the rst documentation")
-if(PANDOC_EXECUTABLE)
- set(WITH_DOC true)
- file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc/)
- add_custom_command(OUTPUT ${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})
+if (NOT PANDOC_EXECUTABLE)
+ find_program(PANDOC_EXECUTABLE NAMES pandoc
+ DOC "The pandoc software, to build the man page from the rst documentation")
+ if(PANDOC_EXECUTABLE)
+ message(STATUS "Found Pandoc: ${PANDOC_EXECUTABLE}")
+ set(WITH_DOC true)
+ file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc/)
+ add_custom_command(OUTPUT ${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()
# Look for litesql and enable the database if found