From dfbc753fd6faae93f6df85b42cddb3378c1bb9e4 Mon Sep 17 00:00:00 2001 From: Roland Conybeare Date: Tue, 3 Oct 2023 17:16:52 -0400 Subject: [PATCH] try canonical cmake form for catch2 dep --- utest/CMakeLists.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/utest/CMakeLists.txt b/utest/CMakeLists.txt index 466cbe0d..b94f1dd5 100644 --- a/utest/CMakeLists.txt +++ b/utest/CMakeLists.txt @@ -22,9 +22,10 @@ target_code_coverage(${SELF_EXECUTABLE_NAME} AUTO ALL) # puts include directory in NIX_CFLAGS_COMPILE, so stuff 'just works' # find_package(Catch2 2 REQUIRED) -set(Catch2_INCLUDES "${Catch2_DIR}/../../../include") -#get_target_property(Catch2_INCLUDES Catch2 INCLUDE_DIRECTORIES) -target_include_directories(${SELF_EXECUTABLE_NAME} PUBLIC ${Catch2_INCLUDES}) +target_link_libraries(${SELF_EXECUTABLE_NAME} Catch2::Catch2) + +#set(Catch2_INCLUDES "${Catch2_DIR}/../../../include") +#target_include_directories(${SELF_EXECUTABLE_NAME} PUBLIC ${Catch2_INCLUDES}) #xo_internal_dependency(${SELF_EXECUTABLE_NAME} Catch2) #target_link_libraries(${SELF_EXECUTABLE_NAME} PUBLIC Catch2)