blob: 6bb0e76a5e46382abc5d988ffd75a153a87c8b72 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
use find_package for GTest
diff --git a/src/Unittests/CMakeLists.txt b/src/Unittests/CMakeLists.txt
index 0d7fb92..73127db 100644
--- a/src/Unittests/CMakeLists.txt
+++ b/src/Unittests/CMakeLists.txt
@@ -73,20 +73,9 @@ if (NOT DEFINED OPENMESH_BUILD_UNIT_TESTS)
endif()
if (OPENMESH_BUILD_UNIT_TESTS)
- # Fetch Gtest from github
- include(FetchContent)
- FetchContent_Declare(
- googletest
- GIT_REPOSITORY https://github.com/google/googletest.git
- GIT_TAG f8d7d77c06936315286eb55f8de22cd23c188571 # v1.14.0
- #FIND_PACKAGE_ARGS NAMES GTest
- )
- # For Windows: Prevent overriding the parent project's compiler/linker settings
- set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
- FetchContent_MakeAvailable(googletest)
-
enable_testing()
+ find_package(GTest CONFIG)
find_package(Eigen3)
# Set correct include paths so that the compiler can find the headers
|