CMake: Install documentation.

This commit is contained in:
Lasse Collin 2024-02-17 18:10:40 +02:00
parent 7a0405bea9
commit d753e2ce47
1 changed files with 32 additions and 0 deletions

View File

@ -23,9 +23,11 @@
# need liblzma, install only its components!): # need liblzma, install only its components!):
# - liblzma_Runtime # - liblzma_Runtime
# - liblzma_Development # - liblzma_Development
# - liblzma_Documentation (examples and Doxygen-generated API docs as HTML)
# - xz (on some platforms only) # - xz (on some platforms only)
# - xzdec (on some platforms only) # - xzdec (on some platforms only)
# - lzmadec (on some platforms only) # - lzmadec (on some platforms only)
# - xz_Documentation (generic docs like README and licenses)
# #
# To find the target liblzma::liblzma from other packages, use the CONFIG # To find the target liblzma::liblzma from other packages, use the CONFIG
# option with find_package() to avoid a conflict with the FindLibLZMA module # option with find_package() to avoid a conflict with the FindLibLZMA module
@ -1813,6 +1815,36 @@ if(UNIX)
endif() endif()
#############################################################################
# Documentation
#############################################################################
# Use OPTIONAL because doc/api might not exist. The liblzma API docs
# can be generated by running "doxygen/update-doxygen".
install(DIRECTORY doc/api doc/examples
DESTINATION "${CMAKE_INSTALL_DOCDIR}"
COMPONENT liblzma_Documentation
OPTIONAL)
# GPLv2 applies to the scripts. If GNU getopt_long is used then
# LGPLv2.1 applies to the command line tools but, using the
# section 3 of LGPLv2.1, GNU getopt_long can be handled as GPLv2 too.
# Thus GPLv2 should be enough here.
install(FILES AUTHORS
COPYING
COPYING.0BSD
COPYING.GPLv2
NEWS
README
THANKS
doc/faq.txt
doc/history.txt
doc/lzma-file-format.txt
doc/xz-file-format.txt
DESTINATION "${CMAKE_INSTALL_DOCDIR}"
COMPONENT xz_Documentation)
############################################################################# #############################################################################
# Tests # Tests
############################################################################# #############################################################################