Browse Source

cmake ignore doxygen option when not a standalone build (#488)

master
Daniel Agar 7 years ago committed by GitHub
parent
commit
48a17b5234
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      CMakeLists.txt

10
CMakeLists.txt

@ -191,13 +191,16 @@ endif()
#============================================================================= #=============================================================================
# Doxygen # Doxygen
# #
option(BUILD_DOXYGEN "Build doxygen documentation" OFF) # Only in standalone build
if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
option(BUILD_DOXYGEN "Build doxygen documentation" OFF)
if (BUILD_DOXYGEN) if (BUILD_DOXYGEN)
find_package(Doxygen) find_package(Doxygen)
if (DOXYGEN_FOUND) if (DOXYGEN_FOUND)
# set input and output files # set input and output files
set(DOXYGEN_IN ${CMAKE_SOURCE_DIR}/docs/Doxyfile.in) set(DOXYGEN_IN ${CMAKE_CURRENT_SOURCE_DIR}/docs/Doxyfile.in)
set(DOXYGEN_OUT ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile) set(DOXYGEN_OUT ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
# request to configure the file # request to configure the file
@ -216,4 +219,5 @@ if (BUILD_DOXYGEN)
else() else()
message(FATAL_ERROR "Doxygen needs to be installed to generate documentation") message(FATAL_ERROR "Doxygen needs to be installed to generate documentation")
endif() endif()
endif()
endif() endif()

Loading…
Cancel
Save