File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -390,24 +390,23 @@ set(CPACK_SOURCE_STRIP_FILES "")
390
390
include (CPack )
391
391
392
392
#doxygen
393
- find_package (Doxygen )
394
- option (BUILD_DOCUMENTATION "Create and install the HTML based API documentation (requires Doxygen)" ${DOXYGEN_FOUND} )
395
-
396
- if (NOT DOXYGEN_FOUND )
397
- message ("Doxygen is needed to build the documentation." )
398
- endif ()
399
-
400
- if (DOXYGEN_FOUND )
393
+ option (BUILD_DOCUMENTATION "Create and install the HTML based API documentation (requires Doxygen)" ON )
394
+ if (BUILD_DOCUMENTATION )
395
+ find_package (Doxygen )
396
+ if (DOXYGEN_FOUND )
401
397
set (docdirectory ${CMAKE_CURRENT_SOURCE_DIR} /doc )
402
398
file (MAKE_DIRECTORY ${docdirectory} )
403
399
set (doxyfile ${CMAKE_CURRENT_SOURCE_DIR} /Doxyfile )
404
400
configure_file (${doxyfile} @ONLY )
405
- message ("Doxygen build started." )
406
401
add_custom_target (doc
407
402
COMMAND ${DOXYGEN_EXECUTABLE} ${doxyfile}
408
403
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
409
404
COMMENT "Generating API documentation with Doxygen"
410
405
VERBATIM )
406
+ else ()
407
+ message ("Doxygen is needed to build the documentation." )
408
+ set (BUILD_DOCUMENTATION OFF )
409
+ endif ()
411
410
endif ()
412
411
413
412
#Messages
@@ -425,4 +424,5 @@ message(" Release/Other: you must install the application before you can run it"
425
424
message ("* Update translations: UPDATE_TRANSLATIONS=${UPDATE_TRANSLATIONS} " )
426
425
message (" WARNING: Do not run \" make clean\" when in update translation mode!" )
427
426
message (" Run \" make translations_target\" to re-generate translations" )
427
+ message ("* Build documentation: BUILD_DOCUMENTATION=${BUILD_DOCUMENTATION} " )
428
428
message ("" )
You can’t perform that action at this time.
0 commit comments