Private
Public Access
2
0

cmake: building doc is now a cmake option and off by default

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
Brendan Le Foll
2014-05-22 11:05:46 +01:00
parent 923e4829a9
commit 45781693c7

View File

@@ -38,22 +38,25 @@ set (maa_VERSION_STRING ${maa_VERSION_MAJOR}.${maa_VERSION_MINOR}.${maa_VERSION_
set (CMAKE_SWIG_FLAGS "") set (CMAKE_SWIG_FLAGS "")
option (GTEST "Build all gtests." OFF) option (GTEST "Build all gtests." OFF)
option (BUILDDOC "Build all doc." OFF)
if (test) if (GTEST)
enable_testing () enable_testing ()
add_subdirectory (tests) add_subdirectory (tests)
endif () endif ()
# add a target to generate API documentation with Doxygen if (BUILDDOC)
find_package (Doxygen) # add a target to generate API documentation with Doxygen
if (DOXYGEN_FOUND) find_package (Doxygen)
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY) if (DOXYGEN_FOUND)
add_custom_target (doc configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile add_custom_target (doc
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
COMMENT "Generating API documentation with Doxygen" VERBATIM WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
) COMMENT "Generating API documentation with Doxygen" VERBATIM
endif (DOXYGEN_FOUND) )
endif (DOXYGEN_FOUND)
endif ()
add_subdirectory (src) add_subdirectory (src)
add_subdirectory (examples) add_subdirectory (examples)