From c0fe869a6245f28186af0329f6308f47e8ca75ea Mon Sep 17 00:00:00 2001 From: Andrew Wildman Date: Fri, 5 Nov 2021 10:24:47 -0700 Subject: [PATCH] Fix CMake to work with FetchContent --- src/CMakeLists.txt | 2 ++ tests/CMakeLists.txt | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 35b4b961..723dbfaa 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -46,6 +46,7 @@ if(NOT STATIC_LIBRARY_ONLY) INTERFACE $ $ + $ $ $ ) @@ -87,6 +88,7 @@ if(NOT SHARED_LIBRARY_ONLY) INTERFACE $ $ + $ $ $ ) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 25610978..fede6b0c 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_policy(SET CMP0063 NEW) # Prepare "Catch" library for other executables -set(CATCH_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/external/Catch) +set(CATCH_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/external/Catch) add_library(Catch INTERFACE) target_include_directories(Catch INTERFACE ${CATCH_INCLUDE_DIR})