aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2024-02-17 18:10:40 +0200
committerLasse Collin <lasse.collin@tukaani.org>2024-02-19 12:21:37 +0200
commitd753e2ce4715552884afadc4ed6fbf8ccca6efac (patch)
treeeab9918f66292281d006a0077eb4559e8ee250a3
parentCMake: Bump maximum policy version to 3.28. (diff)
downloadxz-d753e2ce4715552884afadc4ed6fbf8ccca6efac.tar.xz
CMake: Install documentation.
-rw-r--r--CMakeLists.txt32
1 files changed, 32 insertions, 0 deletions
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
@@ -1814,6 +1816,36 @@ 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
#############################################################################