summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt22
1 files changed, 2 insertions, 20 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c6ac616..e217171 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -74,26 +74,8 @@ set(SOFTWARE_VERSION
#
## The rule that generates the documentation
#
-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)
-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()
-mark_as_advanced(PANDOC_EXECUTABLE)
+add_custom_target(doc COMMAND make html BUILDDIR=${CMAKE_CURRENT_BINARY_DIR}
+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/doc)
#
## Set this search path for cmake, to find our custom search modules