Skip to content

Commit

Permalink
Merge branch 'fix_cmake_doxygen_flow' into 'master'
Browse files Browse the repository at this point in the history
consolidate cmake documentation (BUILD_DOCS) flow

See merge request OpenMW/openmw!4177
  • Loading branch information
psi29a committed Jun 20, 2024
2 parents 3a686dd + 1ccf101 commit 81ceb49
Showing 1 changed file with 11 additions and 13 deletions.
24 changes: 11 additions & 13 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -168,13 +168,6 @@ option(OPENMW_USE_SYSTEM_GOOGLETEST "Use system Google Test library." OFF)
option(OPENMW_UNITY_BUILD "Use fewer compilation units to speed up compile time" FALSE)
option(OPENMW_LTO_BUILD "Build OpenMW with Link-Time Optimization (Needs ~2GB of RAM)" OFF)

# what is necessary to build documentation
IF( BUILD_DOCS )
# Builds the documentation.
FIND_PACKAGE( Sphinx REQUIRED )
FIND_PACKAGE( Doxygen REQUIRED )
ENDIF()

# OS X deployment
option(OPENMW_OSX_DEPLOYMENT OFF)

Expand Down Expand Up @@ -1107,12 +1100,17 @@ elseif(NOT APPLE)
endif(WIN32)
endif(OPENMW_OSX_DEPLOYMENT AND APPLE)

# Doxygen Target -- simply run 'make doc' or 'make doc_pages'
# output directory for 'make doc' is "${OpenMW_BINARY_DIR}/docs/Doxygen"
# output directory for 'make doc_pages' is "${DOXYGEN_PAGES_OUTPUT_DIR}" if defined
# or "${OpenMW_BINARY_DIR}/docs/Pages" otherwise
find_package(Doxygen)
if (DOXYGEN_FOUND)
# what is necessary to build documentation
if ( BUILD_DOCS )
# Builds the documentation.
FIND_PACKAGE( Sphinx REQUIRED )
FIND_PACKAGE( Doxygen REQUIRED )

# Doxygen Target -- simply run 'make doc' or 'make doc_pages'
# output directory for 'make doc' is "${OpenMW_BINARY_DIR}/docs/Doxygen"
# output directory for 'make doc_pages' is "${DOXYGEN_PAGES_OUTPUT_DIR}" if defined
# or "${OpenMW_BINARY_DIR}/docs/Pages" otherwise

# determine output directory for doc_pages
if (NOT DEFINED DOXYGEN_PAGES_OUTPUT_DIR)
set(DOXYGEN_PAGES_OUTPUT_DIR "${OpenMW_BINARY_DIR}/docs/Pages")
Expand Down

0 comments on commit 81ceb49

Please sign in to comment.