Fixed "make docs" for out-of-tree builds.
Also: this automatically updates the version number in the docs, so I don't have to with each release. (transplanted from 72778f1e98f06c1e02f88dc8d263027d61469766)
This commit is contained in:
parent
8e4fb13617
commit
7dee41eb0c
|
@ -560,7 +560,23 @@ INSTALL(FILES src/physfs.h DESTINATION include)
|
||||||
|
|
||||||
FIND_PACKAGE(Doxygen)
|
FIND_PACKAGE(Doxygen)
|
||||||
IF(DOXYGEN_FOUND)
|
IF(DOXYGEN_FOUND)
|
||||||
ADD_CUSTOM_TARGET(docs ${DOXYGEN_EXECUTABLE} COMMENT "Building documentation")
|
SET(PHYSFS_OUTPUT_DOXYFILE "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile")
|
||||||
|
CONFIGURE_FILE(
|
||||||
|
"${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile"
|
||||||
|
"${PHYSFS_OUTPUT_DOXYFILE}"
|
||||||
|
COPYONLY
|
||||||
|
)
|
||||||
|
FILE(APPEND "${PHYSFS_OUTPUT_DOXYFILE}" "\n\n# Below auto-generated by cmake...\n\n")
|
||||||
|
FILE(APPEND "${PHYSFS_OUTPUT_DOXYFILE}" "PROJECT_NUMBER = ${PHYSFS_VERSION}\n")
|
||||||
|
FILE(APPEND "${PHYSFS_OUTPUT_DOXYFILE}" "OUTPUT_DIRECTORY = ${CMAKE_CURRENT_BINARY_DIR}/docs\n")
|
||||||
|
FILE(APPEND "${PHYSFS_OUTPUT_DOXYFILE}" "\n# End auto-generated section.\n\n")
|
||||||
|
|
||||||
|
ADD_CUSTOM_TARGET(
|
||||||
|
docs
|
||||||
|
${DOXYGEN_EXECUTABLE} "${PHYSFS_OUTPUT_DOXYFILE}"
|
||||||
|
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||||
|
COMMENT "Building documentation in 'docs' directory..."
|
||||||
|
)
|
||||||
ELSE(DOXYGEN_FOUND)
|
ELSE(DOXYGEN_FOUND)
|
||||||
MESSAGE(STATUS "Doxygen not found. You won't be able to build documentation.")
|
MESSAGE(STATUS "Doxygen not found. You won't be able to build documentation.")
|
||||||
ENDIF(DOXYGEN_FOUND)
|
ENDIF(DOXYGEN_FOUND)
|
||||||
|
|
|
@ -23,7 +23,8 @@ PROJECT_NAME = physfs
|
||||||
# This could be handy for archiving the generated documentation or
|
# This could be handy for archiving the generated documentation or
|
||||||
# if some version control system is used.
|
# if some version control system is used.
|
||||||
|
|
||||||
PROJECT_NUMBER = 2.0.0
|
# (CMake will set this properly at build time. --ryan.)
|
||||||
|
PROJECT_NUMBER = unknown_version
|
||||||
|
|
||||||
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
|
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
|
||||||
# base path where the generated documentation will be put.
|
# base path where the generated documentation will be put.
|
||||||
|
|
Loading…
Reference in New Issue