Skip to content
This repository was archived by the owner on Feb 16, 2023. It is now read-only.

Commit 3137adb

Browse files
connorimesStephanie Labasan
authored and
Stephanie Labasan
committed
Doxygen now works for out-of-source builds.
Signed-off-by: Connor Imes <[email protected]>
1 parent 2332226 commit 3137adb

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

CMakeLists.txt

+1-5
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,7 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/lib)
4444

4545
add_subdirectory(src)
4646
add_subdirectory(include)
47-
48-
find_package(Doxygen)
49-
if (DOXYGEN_FOUND)
50-
add_subdirectory(dox)
51-
endif(DOXYGEN_FOUND)
47+
add_subdirectory(dox)
5248

5349
add_subdirectory(test)
5450
add_subdirectory(msrmod)

dox/CMakeLists.txt

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
find_package(Doxygen)
22
if (DOXYGEN_FOUND)
33
add_custom_target(doc
4-
${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
5-
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/..
4+
${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile
5+
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
66
COMMENT "Generating API documentation with Doxygen" VERBATIM
77
)
88

99
add_custom_target(latex_doc
10-
cd ${CMAKE_CURRENT_BINARY_DIR}/latex && make
11-
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/latex
10+
make
11+
DEPENDS doc
12+
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/latex
1213
COMMENT "Building Doxygen Latex documentation" VERBATIM
1314
)
1415
endif(DOXYGEN_FOUND)

0 commit comments

Comments
 (0)