mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 04:43:10 +00:00
[cmake] copy shipped documentation files if they exist
Enables documentation in tarballs to be installed, even if Doxygen isn't present.
This commit is contained in:
parent
e1bc48492f
commit
56be045324
1 changed files with 19 additions and 2 deletions
|
@ -5,10 +5,27 @@ INCLUDE(FeatureSummary)
|
|||
IF(DOXYGEN_FOUND)
|
||||
OPTION(BUILD_DOCS "build documentation (requires Doxygen)" ON)
|
||||
ELSE(DOXYGEN_FOUND)
|
||||
SET(BUILD_DOCS OFF)
|
||||
OPTION(BUILD_DOCS "build documentation (requires Doxygen)" OFF)
|
||||
ENDIF(DOXYGEN_FOUND)
|
||||
|
||||
ADD_FEATURE_INFO(Documentation BUILD_DOCS "user manual and documentation")
|
||||
IF(BUILD_DOCS AND NOT DOXYGEN_FOUND)
|
||||
MESSAGE(FATAL_ERROR "build documentation selected, but Doxygen could not be found")
|
||||
ENDIF()
|
||||
|
||||
IF(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/user_doc/html
|
||||
AND IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/share/man/man1)
|
||||
SET(HAVE_PREBUILT_DOCS TRUE)
|
||||
ELSE()
|
||||
SET(HAVE_PREBUILT_DOCS FALSE)
|
||||
ENDIF()
|
||||
|
||||
IF(BUILD_DOCS OR HAVE_PREBUILT_DOCS)
|
||||
SET(INSTALL_DOCS ON)
|
||||
ELSE()
|
||||
SET(INSTALL_DOCS OFF)
|
||||
ENDIF()
|
||||
|
||||
ADD_FEATURE_INFO(Documentation INSTALL_DOCS "user manual and documentation")
|
||||
|
||||
IF(BUILD_DOCS)
|
||||
# Files in ./share/completions/
|
||||
|
|
Loading…
Reference in a new issue