Skip to content

Commit

Permalink
Added Doxygen configuration file and an CMake option to produce docs
Browse files Browse the repository at this point in the history
p4#: 21339
  • Loading branch information
Magne Sjaastad committed Apr 19, 2013
1 parent b5b9a73 commit a9bde40
Showing 1 changed file with 25 additions and 6 deletions.
31 changes: 25 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,11 @@ if (NOT "${RESINSIGHT_PLATFORM}" STREQUAL "")
endif()

# override system install prefix if private installation chosen
option (PRIVATE_INSTALL "Install in a private directory" ON)
if (PRIVATE_INSTALL)
set (CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/Install/)
#set (CMAKE_INSTALL_PREFIX /usr/${RESINSIGHT_FINAL_NAME})
endif (PRIVATE_INSTALL)
option (RESINSIGHT_PRIVATE_INSTALL "Install in a private directory" ON)
if (RESINSIGHT_PRIVATE_INSTALL)
set (CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/Install/)
#set (CMAKE_INSTALL_PREFIX /usr/${RESINSIGHT_FINAL_NAME})
endif (RESINSIGHT_PRIVATE_INSTALL)

################################################################################
# Application
Expand All @@ -145,7 +145,26 @@ add_subdirectory(ApplicationCode/ModelVisualization/ModelVisualization_UnitTests




################################################################################
# Code documentation using Doxygen
################################################################################
option(RESINSIGHT_BUILD_DOCUMENTATION "Use Doxygen to create the HTML based API documentation" OFF)
if(RESINSIGHT_BUILD_DOCUMENTATION)
FIND_PACKAGE(Doxygen)
if (NOT DOXYGEN_FOUND)
message(FATAL_ERROR
"Doxygen is needed to build the documentation. Please install it correctly")
endif()
#-- Configure the Template Doxyfile for our specific project
configure_file(Doxyfile.in
${PROJECT_BINARY_DIR}/Doxyfile @ONLY IMMEDIATE)
#-- Add a custom target to run Doxygen when ever the project is built
add_custom_target (Docs ALL
COMMAND ${DOXYGEN_EXECUTABLE} ${PROJECT_BINARY_DIR}/Doxyfile
SOURCES ${PROJECT_BINARY_DIR}/Doxyfile)
# IF you do NOT want the documentation to be generated EVERY time you build the project
# then leave out the 'ALL' keyword from the above command.
endif(RESINSIGHT_BUILD_DOCUMENTATION)

################################################################################
# Installation packaging
Expand Down

0 comments on commit a9bde40

Please sign in to comment.