|
|
2496d2 |
From 8f3592b3d59874b4dd230a741fad3ffa99223a45 Mon Sep 17 00:00:00 2001
|
|
|
2496d2 |
From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= <besser82@fedoraproject.org>
|
|
|
2496d2 |
Date: Mon, 18 May 2020 18:20:01 +0200
|
|
|
2496d2 |
Subject: [PATCH] CMake: Fix out-of-tree build for Doxygen documentation.
|
|
|
2496d2 |
|
|
|
2496d2 |
---
|
|
|
2496d2 |
CMakeLists.txt | 9 +++++----
|
|
|
2496d2 |
Doxyfile => Doxyfile.in | 4 ++--
|
|
|
2496d2 |
2 files changed, 7 insertions(+), 6 deletions(-)
|
|
|
2496d2 |
rename Doxyfile => Doxyfile.in (99%)
|
|
|
2496d2 |
|
|
|
2496d2 |
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
|
2496d2 |
index 901eb6e364..f58301c71a 100644
|
|
|
2496d2 |
--- a/CMakeLists.txt
|
|
|
2496d2 |
+++ b/CMakeLists.txt
|
|
|
2496d2 |
@@ -368,13 +368,14 @@ option(BUILD_DOCUMENTATION "Create and install the HTML based API documentation(
|
|
|
2496d2 |
|
|
|
2496d2 |
if (DOXYGEN_FOUND)
|
|
|
2496d2 |
|
|
|
2496d2 |
+ configure_file(${PROJECT_SOURCE_DIR}/Doxyfile.in
|
|
|
2496d2 |
+ ${PROJECT_BINARY_DIR}/Doxyfile)
|
|
|
2496d2 |
+ message(STATUS "Written ${PROJECT_BINARY_DIR}/Doxyfile")
|
|
|
2496d2 |
+
|
|
|
2496d2 |
add_custom_target(doc
|
|
|
2496d2 |
- COMMAND ${DOXYGEN_EXECUTABLE} ${PROJECT_SOURCE_DIR}/Doxyfile
|
|
|
2496d2 |
+ COMMAND ${DOXYGEN_EXECUTABLE} ${PROJECT_BINARY_DIR}/Doxyfile
|
|
|
2496d2 |
WORKING_DIRECTORY ${PROJECT_BINARY_DIR})
|
|
|
2496d2 |
|
|
|
2496d2 |
- # request to configure the file
|
|
|
2496d2 |
- configure_file(Doxyfile Doxyfile)
|
|
|
2496d2 |
-
|
|
|
2496d2 |
else (DOXYGEN_FOUND)
|
|
|
2496d2 |
message("Warning: doxygen not found, the 'doc' target will not be included")
|
|
|
2496d2 |
endif(DOXYGEN_FOUND)
|
|
|
2496d2 |
diff --git a/Doxyfile b/Doxyfile.in
|
|
|
2496d2 |
similarity index 99%
|
|
|
2496d2 |
rename from Doxyfile
|
|
|
2496d2 |
rename to Doxyfile.in
|
|
|
2496d2 |
index 06d54e661e..42a08535c2 100644
|
|
|
2496d2 |
--- a/Doxyfile
|
|
|
2496d2 |
+++ b/Doxyfile.in
|
|
|
2496d2 |
@@ -38,7 +38,7 @@ PROJECT_NAME = json-c
|
|
|
2496d2 |
# could be handy for archiving the generated documentation or if some version
|
|
|
2496d2 |
# control system is used.
|
|
|
2496d2 |
|
|
|
2496d2 |
-PROJECT_NUMBER = 0.14
|
|
|
2496d2 |
+PROJECT_NUMBER = @PROJECT_VERSION@
|
|
|
2496d2 |
|
|
|
2496d2 |
# Using the PROJECT_BRIEF tag one can provide an optional one line description
|
|
|
2496d2 |
# for a project that appears at the top of each page and should give viewer a
|
|
|
2496d2 |
@@ -753,7 +753,7 @@ WARN_LOGFILE =
|
|
|
2496d2 |
# spaces.
|
|
|
2496d2 |
# Note: If this tag is empty the current directory is searched.
|
|
|
2496d2 |
|
|
|
2496d2 |
-INPUT =
|
|
|
2496d2 |
+INPUT = @CMAKE_SOURCE_DIR@ @CMAKE_BINARY_DIR@
|
|
|
2496d2 |
|
|
|
2496d2 |
# This tag can be used to specify the character encoding of the source files
|
|
|
2496d2 |
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
|