From 10ec2d23f14cf5d3e4835d9bcb57d0937f803e6a Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Mon, 8 Aug 2016 21:53:46 +0200 Subject: CMake: Rewrite existing Documentation support and add doxygen This can now build all documentation. It should also be fairly reusable for other projects, as long as they follow the same naming scheme for the po4a output files and set the PACKAGE_* variables used here. We could have done all translations in a single call to po4a like the makefile based buildsystem does. While that would have made the output slightly nicer, this solution offers a huge performance gain because it can translate the documents in parallel, which also means that the xsltproc stage does not have to wait for all translations to be done first. You might think that the add_custom_command() should list the actual output files as BYPRODUCTS. This is not true however: Because the files are not always generated, Ninja will think missing byproducts mean that the target is out of date - which is not what we want. Finally, also add the missing doxygen support. Note that the packaging script cleans up some md5 and map files created by doxygen, otherwise it is fairly boring. --- CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 7e432bca3..aed0b506d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,7 +7,7 @@ cmake_minimum_required(VERSION 3.4.0) enable_testing() -option(WITH_DOC "Build documentation." OFF) +option(WITH_DOC "Build documentation." ON) option(USE_NLS "Localisation support." ON) set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/CMake") @@ -142,3 +142,6 @@ add_subdirectory(ftparchive) add_subdirectory(methods) add_subdirectory(po) add_subdirectory(test) + +# Link update-po4a into the update-po target +add_dependencies(update-po update-po4a) -- cgit v1.2.3