summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt4
-rw-r--r--doc/CMakeLists.txt18
-rw-r--r--doc/Doxyfile.in (renamed from doc/Doxyfile)6
3 files changed, 22 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 132d7c47..f18df69a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -276,9 +276,7 @@ elseif(CMAKE_CXX_COMPILER MATCHES "g\\+\\+")
endif()
add_subdirectory(src)
-if(BUILD_DOCS)
- add_subdirectory(doc)
-endif()
+add_subdirectory(doc)
if(BUILD_EMACSLISP)
add_subdirectory(lisp)
endif()
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
index a817c151..54c58737 100644
--- a/doc/CMakeLists.txt
+++ b/doc/CMakeLists.txt
@@ -1,3 +1,21 @@
+if (USE_DOXYGEN)
+ find_package(Doxygen)
+ if(NOT DOXYGEN_FOUND)
+ message(FATAL_ERROR "Could not find doxygen. Reference documentation cannot be built.")
+ endif()
+
+ configure_file(Doxyfile.in Doxyfile @ONLY)
+ add_custom_target(doxygen ALL
+ COMMAND ${DOXYGEN_EXECUTABLE} Doxyfile
+ SOURCES Doxyfile)
+endif(USE_DOXYGEN)
+
+########################################################################
+
+if(NOT BUILD_DOCS)
+ return()
+endif()
+
set(info_files ledger.texi ledger3.texi)
find_program(MAKEINFO makeinfo)
diff --git a/doc/Doxyfile b/doc/Doxyfile.in
index d59d3f82..734eb8df 100644
--- a/doc/Doxyfile
+++ b/doc/Doxyfile.in
@@ -38,7 +38,7 @@ PROJECT_NUMBER = 3.0
# If a relative path is entered, it will be relative to the location
# where doxygen was started. If left blank the current directory will be used.
-OUTPUT_DIRECTORY = %builddir%/doc
+OUTPUT_DIRECTORY = @CMAKE_CURRENT_BINARY_DIR@
# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
# 4096 sub-directories (in 2 levels) under the output directory of each output
@@ -124,7 +124,7 @@ FULL_PATH_NAMES = NO
# If left blank the directory from which doxygen is run is used as the
# path to strip.
-STRIP_FROM_PATH = %srcdir%/src/
+STRIP_FROM_PATH = @PROJECT_SOURCE_DIR@/src/
# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
# the path mentioned in the documentation of a class, which tells
@@ -564,7 +564,7 @@ WARN_LOGFILE =
# directories like "/usr/src/myproject". Separate the files or directories
# with spaces.
-INPUT = src
+INPUT = @PROJECT_SOURCE_DIR@/src
# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is