summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/CMakeLists.txt9
-rw-r--r--doc/Doxyfile.in4
2 files changed, 7 insertions, 6 deletions
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
index 08132224..1a510c1a 100644
--- a/doc/CMakeLists.txt
+++ b/doc/CMakeLists.txt
@@ -23,14 +23,15 @@ if (USE_DOXYGEN)
message(FATAL_ERROR "Could not find doxygen. Reference documentation cannot be built.")
endif()
- configure_file(Doxyfile.in Doxyfile @ONLY)
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile @ONLY)
# see INPUT/FILE_PATTERNS in Doxyfile.in
- file(GLOB doxygen_input_files ${CMAKE_SOURCE_DIR}/src/*.h)
+ file(GLOB doxygen_input_files ${CMAKE_CURRENT_SOURCE_DIR}/../src/*.h)
add_custom_command(OUTPUT html/index.html
- COMMAND ${DOXYGEN_EXECUTABLE} Doxyfile
- DEPENDS Doxyfile ${doxygen_input_files}
+ COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile
+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile ${doxygen_input_files}
+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Building doxygen documentation")
add_custom_target(doc.doxygen DEPENDS html/index.html)
else()
diff --git a/doc/Doxyfile.in b/doc/Doxyfile.in
index a6f91136..6da4217c 100644
--- a/doc/Doxyfile.in
+++ b/doc/Doxyfile.in
@@ -140,7 +140,7 @@ FULL_PATH_NAMES = NO
# relative paths, which will be relative from the directory where doxygen is
# started.
-STRIP_FROM_PATH = @PROJECT_SOURCE_DIR@/src/
+STRIP_FROM_PATH = @CMAKE_CURRENT_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
@@ -680,7 +680,7 @@ WARN_LOGFILE =
# with spaces.
# please update dependencies in CMakeList.txt if you change this
-INPUT = @PROJECT_SOURCE_DIR@/src
+INPUT = @CMAKE_CURRENT_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