summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorSteve Youngs <steve@sxemacs.org>2021-07-04 11:04:20 +0300
committerIvan Maidanski <ivmai@mail.ru>2021-07-08 15:00:12 +0300
commit596a34c0ea4a720db0ac61b33a8eac10b02837b9 (patch)
treee32723c149e2c60ff355a647231475c048e14d6e /CMakeLists.txt
parent00a278fc6cac57c171527857d849e6477bf78bbe (diff)
downloadbdwgc-596a34c0ea4a720db0ac61b33a8eac10b02837b9.tar.gz
Install docs and man page if enable_docs (CMake)
Issue #356 (bdwgc). * CMakeLists.txt (enable_docs): New option. * CMakeLists.txt [enable_docs]: Install AUTHORS, README.md to ${CMAKE_INSTALL_DOCDIR}. * CMakeLists.txt [enable_docs]: Install README.* and *.md from "doc/" folder to ${CMAKE_INSTALL_DOCDIR}. * CMakeLists.txt [enable_docs]: Install doc/gc.man (as "gc.3").
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt14
1 files changed, 14 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index bf9f6c45..c2df8e6f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -42,6 +42,7 @@ include(GNUInstallDirs)
option(BUILD_SHARED_LIBS "Build shared libraries" ON)
option(build_cord "Build cord library" ON)
option(build_tests "Build tests" OFF)
+option(enable_docs "Build and install documentation" ON)
option(enable_threads "Support threads" ON)
option(enable_parallel_mark "Parallelize marking and free list construction" ON)
option(enable_thread_local_alloc "Turn on thread-local allocation optimization" ON)
@@ -630,3 +631,16 @@ if (build_tests)
add_test(NAME disclaim_weakmap_test COMMAND disclaim_weakmap_test)
endif()
endif(build_tests)
+
+if (enable_docs)
+ # Note: documentation which is not installed: README.QUICK
+ install(FILES AUTHORS README.md
+ DESTINATION "${CMAKE_INSTALL_DOCDIR}")
+ install(DIRECTORY doc/ DESTINATION "${CMAKE_INSTALL_DOCDIR}"
+ FILES_MATCHING
+ PATTERN "README.*"
+ PATTERN "*.md")
+
+ install(FILES doc/gc.man DESTINATION "${CMAKE_INSTALL_MANDIR}/man3"
+ RENAME gc.3)
+endif(enable_docs)