Skip to content

Commit

Permalink
CMakelist: rework the documentation-related to avoid automagic
Browse files Browse the repository at this point in the history
  • Loading branch information
mupuf committed Mar 16, 2016
1 parent cb1c1f9 commit 63906c0
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -390,24 +390,23 @@ set(CPACK_SOURCE_STRIP_FILES "")
include(CPack)

#doxygen
find_package(Doxygen)
option(BUILD_DOCUMENTATION "Create and install the HTML based API documentation (requires Doxygen)" ${DOXYGEN_FOUND})

if(NOT DOXYGEN_FOUND)
message("Doxygen is needed to build the documentation.")
endif()

if(DOXYGEN_FOUND)
option(BUILD_DOCUMENTATION "Create and install the HTML based API documentation (requires Doxygen)" ON)
if (BUILD_DOCUMENTATION)
find_package(Doxygen)
if(DOXYGEN_FOUND)
set(docdirectory ${CMAKE_CURRENT_SOURCE_DIR}/doc)
file(MAKE_DIRECTORY ${docdirectory})
set(doxyfile ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile)
configure_file(${doxyfile} @ONLY)
message("Doxygen build started.")
add_custom_target(doc
COMMAND ${DOXYGEN_EXECUTABLE} ${doxyfile}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMENT "Generating API documentation with Doxygen"
VERBATIM)
else()
message("Doxygen is needed to build the documentation.")
set(BUILD_DOCUMENTATION OFF)
endif()
endif()

#Messages
Expand All @@ -425,4 +424,5 @@ message(" Release/Other: you must install the application before you can run it"
message("* Update translations: UPDATE_TRANSLATIONS=${UPDATE_TRANSLATIONS}")
message(" WARNING: Do not run \"make clean\" when in update translation mode!")
message(" Run \"make translations_target\" to re-generate translations")
message("* Build documentation: BUILD_DOCUMENTATION=${BUILD_DOCUMENTATION}")
message("")

0 comments on commit 63906c0

Please sign in to comment.