From e9540885c0b358c8ddc376f798900829c0f8953d Mon Sep 17 00:00:00 2001 From: Karl F Date: Wed, 12 Feb 2020 12:57:14 +0100 Subject: [PATCH] Add codedoc-buidling to CMake, using naturaldoc (v1.x) --- CMakeLists.txt | 8 ++++++++ COMPILING.txt | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 581fdea30..8f8807141 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -258,6 +258,14 @@ add_executable(savegamedump WIN32 src/PngWriter.cpp ) +find_program(NATURALDOCS NAMES naturaldocs) +if (NATURALDOCS) + add_custom_target(codedoc + ${CMAKE_COMMAND} -E make_directory codedoc + COMMAND naturaldocs -i src/ -i data/libs/ -xi src/data/ -o HTML codedoc/ -p nd/ -do -ro -s Default Local + WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}) +endif() + list(APPEND pioneerLibs pioneerLib ${ASSIMP_LIBRARIES} diff --git a/COMPILING.txt b/COMPILING.txt index 740afc34e..396a02586 100644 --- a/COMPILING.txt +++ b/COMPILING.txt @@ -215,9 +215,9 @@ modules such as missions and BBS interaction. See the pioneer wiki for further details. For up-to-date documentation one can build it locally from the pioneer source -0. Install dependencies: naturaldocs +0. Install dependencies: naturaldocs (v 1.x) -1. Run make codedoc +1. Run make -C build codedoc 2. The html documentation can be found in the codedoc/ folder