summaryrefslogtreecommitdiffstats
path: root/doc/CMakeLists.txt
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2015-05-17 09:58:27 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2015-05-17 09:58:27 (GMT)
commit7bcf8e9a379ec0599160e5562f07b93f8fb9557a (patch)
tree6b8eea084053c1d891b3c9a5c1e993203902718a /doc/CMakeLists.txt
parent2e39e5c7c1427ac6b24c64b7ef01be8d5a20092b (diff)
downloadDoxygen-7bcf8e9a379ec0599160e5562f07b93f8fb9557a.zip
Doxygen-7bcf8e9a379ec0599160e5562f07b93f8fb9557a.tar.gz
Doxygen-7bcf8e9a379ec0599160e5562f07b93f8fb9557a.tar.bz2
Removed old build files, added install targets and other options
Diffstat (limited to 'doc/CMakeLists.txt')
-rw-r--r--doc/CMakeLists.txt64
1 files changed, 60 insertions, 4 deletions
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
index 4505391..c66adf2 100644
--- a/doc/CMakeLists.txt
+++ b/doc/CMakeLists.txt
@@ -1,25 +1,38 @@
+if (build_doc)
+
find_program(EPSTOPDF NAMES epstopdf )
find_program(SED NAMES sed )
+find_program(MAKE NAMES make gmake )
+
+file(GLOB DOC_FILES "*")
+file(COPY ${DOC_FILES} DESTINATION ${DOXYDOCS})
+file(COPY ${EXAMPLE_DIR} DESTINATION ${PROJECT_BINARY_DIR})
+
+file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/man)
add_custom_target(doc
- ALL
COMMENT "Generating documentation in ${DOXYDOCS}"
COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen
COMMAND ${CMAKE_COMMAND} -E remove_directory ../latex/refman.tex
COMMAND ${CMAKE_COMMAND} -E copy doxygen_logo.gif ../html
COMMAND ${CMAKE_COMMAND} -E copy doxygen_logo_low.gif ../html
COMMAND ${CMAKE_COMMAND} -E copy Makefile.latex ../latex/Makefile
- COMMAND ${SED} -e "s/\$$VERSION/$(VERSION)/g" doxygen_manual.tex > ../latex/doxygen_manual.tex
- COMMAND ${SED} -e "s/\$$VERSION/$(VERSION)/g" doxygen.sty > ../latex/doxygen.sty
+ COMMAND ${SED} -e "s/\$VERSION/${VERSION}/g" doxygen_manual.tex > ../latex/doxygen_manual.tex
+ COMMAND ${SED} -e "s/\$VERSION/${VERSION}/g" doxygen.sty > ../latex/doxygen.sty
COMMAND ${EPSTOPDF} doxygen_logo.eps --outfile=../latex/doxygen_logo.pdf
+ COMMAND ${MAKE} -C ../latex
DEPENDS doxygen language.doc config.doc
+ "${PROJECT_BINARY_DIR}/man/doxygen.1"
+ "${PROJECT_BINARY_DIR}/man/doxywizard.1"
+ "${PROJECT_BINARY_DIR}/man/doxysearch.1"
+ "${PROJECT_BINARY_DIR}/man/doxyindexer.1"
WORKING_DIRECTORY ${DOXYDOCS}
VERBATIM
)
# language.doc
add_custom_command(
- COMMAND ${PYTHON_EXECUTABLE} ${DOXYDOCS}/translator.py
+ COMMAND ${CMAKE_COMMAND} -P ${CMAKE_SOURCE_DIR}/cmake/run_translator.cmake
DEPENDS ${DOXYDOCS}/translator.py
DEPENDS maintainers.txt language.tpl translator.py
OUTPUT language.doc
@@ -35,3 +48,46 @@ add_custom_command(
WORKING_DIRECTORY ${DOXYDOCS}
)
set_source_files_properties(${DOXYDOCS}/config.doc PROPERTIES GENERATED 1)
+
+string(TIMESTAMP TODAY "%d-%m-%Y")
+
+add_custom_command(
+ COMMAND ${SED} -e "s/DATE/${TODAY}/g" -e "s/VERSION/${VERSION}/g" doxygen.1 > "${PROJECT_BINARY_DIR}/man/doxygen.1"
+ OUTPUT "${PROJECT_BINARY_DIR}/man/doxygen.1"
+)
+
+add_custom_command(
+ COMMAND ${SED} -e "s/DATE/${TODAY}/g" -e "s/VERSION/${VERSION}/g" doxywizard.1 > "${PROJECT_BINARY_DIR}/man/doxywizard.1"
+ OUTPUT "${PROJECT_BINARY_DIR}/man/doxywizard.1"
+)
+
+add_custom_command(
+ COMMAND ${SED} -e "s/DATE/${TODAY}/g" -e "s/VERSION/${VERSION}/g" doxysearch.1 > "${PROJECT_BINARY_DIR}/man/doxysearch.1"
+ OUTPUT "${PROJECT_BINARY_DIR}/man/doxysearch.1"
+)
+
+add_custom_command(
+ COMMAND ${SED} -e "s/DATE/${TODAY}/g" -e "s/VERSION/${VERSION}/g" doxyindexer.1 > "${PROJECT_BINARY_DIR}/man/doxyindexer.1"
+ OUTPUT "${PROJECT_BINARY_DIR}/man/doxyindexer.1"
+)
+
+install(FILES
+ "${PROJECT_BINARY_DIR}/man/doxygen.1"
+ "${PROJECT_BINARY_DIR}/man/doxywizard.1"
+ "${PROJECT_BINARY_DIR}/man/doxysearch.1"
+ "${PROJECT_BINARY_DIR}/man/doxyindexer.1"
+ DESTINATION man/man1
+)
+
+install(FILES
+ "${PROJECT_BINARY_DIR}/latex/doxygen_manual.pdf"
+ DESTINATION "${CMAKE_INSTALL_PREFIX}/${DOC_INSTALL_DIR}"
+)
+
+install(DIRECTORY
+ "${PROJECT_BINARY_DIR}/examples"
+ "${PROJECT_BINARY_DIR}/html"
+ DESTINATION "${CMAKE_INSTALL_PREFIX}/${DOC_INSTALL_DIR}"
+)
+
+endif()