From 0eb99fb569bf5642e63daabd3f54f9a30c97372f Mon Sep 17 00:00:00 2001 From: Paul le Roux Date: Tue, 19 Jun 2018 07:14:09 +0200 Subject: [PATCH] Add option to not install documentation --- CMakeLists.txt | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ce1ecf8e..ceac8cdb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,6 +19,7 @@ option(CATCH_USE_VALGRIND "Perform SelfTests with Valgrind" OFF) option(CATCH_BUILD_EXAMPLES "Build documentation examples" OFF) option(CATCH_ENABLE_COVERAGE "Generate coverage for codecov.io" OFF) option(CATCH_ENABLE_WERROR "Enable all warnings as errors" ON) +option(CATCH_INSTALL_DOCS "Install documentation alongside library" ON) set_property(GLOBAL PROPERTY USE_FOLDERS ON) @@ -120,12 +121,14 @@ install( ) # Install documentation -install( - DIRECTORY - docs/ - DESTINATION - "${CMAKE_INSTALL_DOCDIR}" -) +if(CATCH_INSTALL_DOCS) + install( + DIRECTORY + docs/ + DESTINATION + "${CMAKE_INSTALL_DOCDIR}" + ) +endif() ## Provide some pkg-config integration