Separate Catch2Config from targets

This lets us add the installed helper scripts to the cmake module
path, letting CMake users just include them after requiring Catch2
package.
This commit is contained in:
Martin Hořeňovský
2018-06-24 10:11:14 +02:00
parent 3743295ca8
commit 1af60ef5ab
2 changed files with 25 additions and 3 deletions

View File

@@ -0,0 +1,10 @@
@PACKAGE_INIT@
# Avoid repeatedly including the targets
if(NOT TARGET Catch2::Catch2)
# Provide path for scripts
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}")
include(${CMAKE_CURRENT_LIST_DIR}/Catch2Targets.cmake)
endif()