diff --git a/CMakeLists.txt b/CMakeLists.txt index 78843d34..ae06757f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -85,7 +85,7 @@ ADD_SUBDIRECTORY(bindings) add_feature_info("Examples" BUILD_EXAMPLES "Examples of PolyVox usage") add_feature_info("Tests" BUILD_TESTS "Unit tests") add_feature_info("Bindings" BUILD_BINDINGS "SWIG bindings") -add_feature_info("API docs" DOXYGEN_FOUND "HTML documentation of the API") +add_feature_info("API docs" BUILD_DOCS "HTML documentation of the API") add_feature_info("Manual" BUILD_MANUAL "HTML user's manual") feature_summary(WHAT ALL) @@ -97,6 +97,6 @@ MESSAGE(STATUS "-------") MESSAGE(STATUS "Build examples: " ${BUILD_EXAMPLES}) MESSAGE(STATUS "Build tests: " ${BUILD_TESTS}) MESSAGE(STATUS "Build bindings: " ${BUILD_BINDINGS}) -MESSAGE(STATUS "API Docs available: " ${DOXYGEN_FOUND}) +MESSAGE(STATUS "API Docs available: " ${BUILD_DOCS}) MESSAGE(STATUS "Build manual: " ${BUILD_MANUAL}) MESSAGE(STATUS "") diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt index b615f937..61498569 100644 --- a/include/CMakeLists.txt +++ b/include/CMakeLists.txt @@ -135,6 +135,7 @@ set_package_properties(Doxygen PROPERTIES URL http://www.doxygen.org DESCRIPTION #Documentation if(DOXYGEN_FOUND) + SET(BUILD_DOCS ON PARENT_SCOPE) #configure_file(${CMAKE_CURRENT_SOURCE_DIR}/polyvox.css ${CMAKE_CURRENT_BINARY_DIR}/polyvox.css) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile) #This is just the default doc target which only runs Doxygen @@ -167,4 +168,6 @@ if(DOXYGEN_FOUND) OPTIONAL ) endif() +else() + SET(BUILD_DOCS OFF PARENT_SCOPE) endif()