From d40ecef57050a48ca2abf9c307793d183972658e Mon Sep 17 00:00:00 2001 From: Gianfranco Costamagna Date: Mon, 17 May 2021 02:53:40 +0200 Subject: gtest: Find system-provided external gtest (#301) Find system-provided external gtest in case a system version is available, without need to recompile the bundled version everytime --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 08900a9..9bc416a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -240,7 +240,11 @@ add_subdirectory(src) add_subdirectory(include/dlt) add_subdirectory(testscripts) if (WITH_DLT_UNIT_TESTS) - add_subdirectory( gtest-1.7.0 ) + find_package(GTest) + + if (NOT GTEST_FOUND) + add_subdirectory( gtest-1.7.0 ) + endif() enable_testing() add_subdirectory(tests) endif() -- cgit v1.2.1