diff options
author | Donovan Baarda <abo@minkirri.apana.org.au> | 2021-08-21 11:57:28 +1000 |
---|---|---|
committer | Donovan Baarda <abo@minkirri.apana.org.au> | 2021-08-21 11:57:28 +1000 |
commit | 0ce69e72e2505a3bebdfa141279bb48f711d6046 (patch) | |
tree | c6c7c10ac9011259be8316159b69c57853245528 | |
parent | 46f695a860257cc30e8fe0f90296aa877d5b0ada (diff) | |
download | librsync-0ce69e72e2505a3bebdfa141279bb48f711d6046.tar.gz |
Change doc target to run in `CMAKE_CURRENT_SOURCE_DIR`.
Make the doc target run in CMAKE_CURRENT_SOURCE_DIR and change `Doxyfile.in`
to generate output into `OUTPUT_DIRECTORY = @CMAKE_CURRENT_BINARY_DIR@`.
This ensures consistent doc filenames and references when using different
build directorys, without leaking the full path of where it was built. See
-rw-r--r-- | CMakeLists.txt | 2 | ||||
-rw-r--r-- | doc/Doxyfile.in | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 477e6dc..f5943db 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -218,7 +218,7 @@ if(DOXYGEN_FOUND) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doc/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/doc/Doxyfile @ONLY) add_custom_target(doc ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/doc/Doxyfile - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMENT "Generating API documentation with Doxygen" VERBATIM ) endif(DOXYGEN_FOUND) diff --git a/doc/Doxyfile.in b/doc/Doxyfile.in index 9c8f2b1..b89bbd2 100644 --- a/doc/Doxyfile.in +++ b/doc/Doxyfile.in @@ -58,7 +58,7 @@ PROJECT_LOGO = # entered, it will be relative to the location where doxygen was started. If # left blank the current directory will be used. -OUTPUT_DIRECTORY = . +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 format and |