Add option to not install documentation

This commit is contained in:
Paul le Roux 2018-06-19 07:14:09 +02:00 committed by Martin Hořeňovský
parent bf221583b1
commit 0eb99fb569

View File

@ -19,6 +19,7 @@ option(CATCH_USE_VALGRIND "Perform SelfTests with Valgrind" OFF)
option(CATCH_BUILD_EXAMPLES "Build documentation examples" OFF) option(CATCH_BUILD_EXAMPLES "Build documentation examples" OFF)
option(CATCH_ENABLE_COVERAGE "Generate coverage for codecov.io" OFF) option(CATCH_ENABLE_COVERAGE "Generate coverage for codecov.io" OFF)
option(CATCH_ENABLE_WERROR "Enable all warnings as errors" ON) 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) set_property(GLOBAL PROPERTY USE_FOLDERS ON)
@ -120,12 +121,14 @@ install(
) )
# Install documentation # Install documentation
install( if(CATCH_INSTALL_DOCS)
install(
DIRECTORY DIRECTORY
docs/ docs/
DESTINATION DESTINATION
"${CMAKE_INSTALL_DOCDIR}" "${CMAKE_INSTALL_DOCDIR}"
) )
endif()
## Provide some pkg-config integration ## Provide some pkg-config integration