-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
13 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,28 @@ | ||
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.11) | ||
project(wave_docs) | ||
PROJECT(wave_docs) | ||
|
||
# DOCS_INPUT is a space-separated list of subdirectories, used for Doxygen input | ||
set(WAVE_DOXY_INPUT | ||
SET(WAVE_DOXY_INPUT | ||
"${WAVE_SOURCE_DIR}/README.md ${CMAKE_CURRENT_SOURCE_DIR}/ref") | ||
|
||
foreach(dir ${LIBWAVE_MODULES}) | ||
include_directories(${dir}/include) | ||
set(WAVE_DOXY_INPUT "${WAVE_DOXY_INPUT} ${WAVE_SOURCE_DIR}/${dir}") | ||
endforeach() | ||
FOREACH(dir ${LIBWAVE_MODULES}) | ||
INCLUDE_DIRECTORIES(${dir}/include) | ||
SET(WAVE_DOXY_INPUT "${WAVE_DOXY_INPUT} ${WAVE_SOURCE_DIR}/${dir}") | ||
ENDFOREACH() | ||
|
||
|
||
find_package(Doxygen) | ||
if(DOXYGEN_FOUND) | ||
configure_file(Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY) | ||
FIND_PACKAGE(Doxygen) | ||
IF(DOXYGEN_FOUND) | ||
CONFIGURE_FILE(Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY) | ||
|
||
# Find images under "ref". We must copy them separately | ||
file(GLOB_RECURSE REF_IMAGES ref "*.jpg" "*.png" "*.gif") | ||
FILE(GLOB_RECURSE REF_IMAGES ref "*.jpg" "*.png" "*.gif") | ||
|
||
# Generate documentation with Doxygen | ||
add_custom_target(doc | ||
ADD_CUSTOM_TARGET(doc | ||
${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile | ||
COMMAND ${CMAKE_COMMAND} -E | ||
copy ${REF_IMAGES} ${WAVE_BINARY_DIR}/docs/html | ||
WORKING_DIRECTORY ${WAVE_SOURCE_DIR}/docs | ||
COMMENT "Generating API documentation with Doxygen" VERBATIM | ||
) | ||
|
||
|
||
|
||
endif() | ||
|
||
|
||
COMMENT "Generating API documentation with Doxygen" VERBATIM) | ||
ENDIF() |