From ed582bde4da06bb38fa5cd406a31c7d1c76c2a39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ho=C5=99e=C5=88ovsk=C3=BD?= Date: Sat, 23 Jun 2018 19:04:22 +0200 Subject: [PATCH] Include contrib in installation --- CMakeLists.txt | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index ceac8cdb..e753c6b5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,6 +20,8 @@ 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) +option(CATCH_INSTALL_HELPERS "Install contrib alongside library" ON) + set_property(GLOBAL PROPERTY USE_FOLDERS ON) @@ -130,6 +132,26 @@ if(CATCH_INSTALL_DOCS) ) endif() +if(CATCH_INSTALL_HELPERS) +# Install CMake scripts +install( + FILES + "contrib/ParseAndAddCatchTests.cmake" + "contrib/Catch.cmake" + "contrib/CatchAddTests.cmake" + DESTINATION + ${CATCH_CMAKE_CONFIG_DESTINATION} +) + +# Install debugger helpers +install( + FILES + "contrib/gdbinit" + "contrib/lldbinit" + DESTINATION + ${CMAKE_INSTALL_DATAROOTDIR}/Catch2 +) +endif() ## Provide some pkg-config integration set(PKGCONFIG_INSTALL_DIR