Add option to turn off the build of the documentation if Doxygen was found
This commit is contained in:
parent
b8fa8fdcac
commit
23690f316d
|
@ -229,6 +229,8 @@ install(EXPORT PhysFSExport
|
|||
)
|
||||
|
||||
|
||||
option(PHYSFS_BUILD_DOCS "Build doxygen based documentation" TRUE)
|
||||
if(PHYSFS_BUILD_DOCS)
|
||||
find_package(Doxygen)
|
||||
if(DOXYGEN_FOUND)
|
||||
set(PHYSFS_OUTPUT_DOXYFILE "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile")
|
||||
|
@ -243,15 +245,18 @@ if(DOXYGEN_FOUND)
|
|||
file(APPEND "${PHYSFS_OUTPUT_DOXYFILE}" "\n# End auto-generated section.\n\n")
|
||||
|
||||
set(PHYSFS_TARGETNAME_DOCS "docs" CACHE STRING "Name of 'docs' build target")
|
||||
|
||||
add_custom_target(
|
||||
${PHYSFS_TARGETNAME_DOCS}
|
||||
${DOXYGEN_EXECUTABLE} "${PHYSFS_OUTPUT_DOXYFILE}"
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
COMMENT "Building documentation in 'docs' directory..."
|
||||
)
|
||||
|
||||
else()
|
||||
message(STATUS "Doxygen not found. You won't be able to build documentation.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(UNIX)
|
||||
set(PHYSFS_TARBALL "${CMAKE_CURRENT_SOURCE_DIR}/../physfs-${PHYSFS_VERSION}.tar.gz")
|
||||
|
@ -307,6 +312,7 @@ message_bool_option("ISO9660 support" PHYSFS_ARCHIVE_ISO9660)
|
|||
message_bool_option("Build static library" PHYSFS_BUILD_STATIC)
|
||||
message_bool_option("Build shared library" PHYSFS_BUILD_SHARED)
|
||||
message_bool_option("Build stdio test program" PHYSFS_BUILD_TEST)
|
||||
message_bool_option("Build Doxygen documentation" PHYSFS_BUILD_DOCS)
|
||||
if(PHYSFS_BUILD_TEST)
|
||||
message_bool_option(" Use readline in test program" HAVE_SYSTEM_READLINE)
|
||||
endif()
|
||||
|
|
Loading…
Reference in New Issue