]> git.ipfire.org Git - thirdparty/xz.git/commitdiff
CMake: Install documentation.
authorLasse Collin <lasse.collin@tukaani.org>
Sat, 17 Feb 2024 16:10:40 +0000 (18:10 +0200)
committerLasse Collin <lasse.collin@tukaani.org>
Mon, 19 Feb 2024 10:21:37 +0000 (12:21 +0200)
CMakeLists.txt

index c82ed349dc81d6e85abd78aa68ed478f10ea5b2f..323533a49eb61768fde43ff1d34edcfea180cd75 100644 (file)
 # 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
 #############################################################################