From d753e2ce4715552884afadc4ed6fbf8ccca6efac Mon Sep 17 00:00:00 2001 From: Lasse Collin Date: Sat, 17 Feb 2024 18:10:40 +0200 Subject: [PATCH] CMake: Install documentation. --- CMakeLists.txt | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index c82ed349..323533a4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,9 +23,11 @@ # need liblzma, install only its components!): # - liblzma_Runtime # - liblzma_Development +# - liblzma_Documentation (examples and Doxygen-generated API docs as HTML) # - xz (on some platforms only) # - xzdec (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 # option with find_package() to avoid a conflict with the FindLibLZMA module @@ -1813,6 +1815,36 @@ if(UNIX) 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 #############################################################################