36 lines
1.1 KiB
CMake
36 lines
1.1 KiB
CMake
cmake_minimum_required(VERSION 2.8)
|
|
|
|
# We need to modify the Doxyfile slightly. We'll copy the Doxyfile into the
|
|
# build directory, update the location of the source, and then run Doxygen and
|
|
# it will generate the documentation into the build directory.
|
|
|
|
message(STATUS "Hurble ${CMAKE_CURRENT_SOURCE_DIR}")
|
|
|
|
# First, read the Doxyfile in as a variable.
|
|
file(READ "${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile" DOXYFILE_CONTENTS)
|
|
|
|
# Now, modify all the "INPUT" paths. I've written each of the three out by
|
|
# hand. If more are added, they'll need to be added here too.
|
|
string(REPLACE
|
|
"./src/mlpack"
|
|
"${CMAKE_CURRENT_SOURCE_DIR}/src/mlpack"
|
|
DOXYFILE_AUXVAR "${DOXYFILE_CONTENTS}"
|
|
)
|
|
|
|
string(REPLACE
|
|
"./doc/guide"
|
|
"${CMAKE_CURRENT_SOURCE_DIR}/doc/guide"
|
|
DOXYFILE_CONTENTS "${DOXYFILE_AUXVAR}"
|
|
)
|
|
|
|
string(REPLACE
|
|
"./doc/tutorials"
|
|
"${CMAKE_CURRENT_SOURCE_DIR}/doc/tutorials"
|
|
DOXYFILE_AUXVAR "${DOXYFILE_CONTENTS}"
|
|
)
|
|
|
|
message(STATUS "Ready to go ${DESTDIR}")
|
|
|
|
# Save the Doxyfile to its new location.
|
|
file(WRITE "${DESTDIR}/Doxyfile" "${DOXYFILE_AUXVAR}")
|