diff --git a/cmake/findDependencies.cmake b/cmake/findDependencies.cmake index 85a7c7a1..64a22569 100644 --- a/cmake/findDependencies.cmake +++ b/cmake/findDependencies.cmake @@ -55,10 +55,6 @@ if( BUILD_WITH_CCACHE ) endif() endif() -if (EXIV2_BUILD_UNIT_TESTS) - find_package(GTest REQUIRED) -endif() - # On Windows we are interested in placing the DLLs together to the binaries in the install/bin # folder, at the installation step. On other platforms we do not care about that, since the # RPATHs will point the locations where the libraries where found. diff --git a/unitTests/CMakeLists.txt b/unitTests/CMakeLists.txt index b8f89e06..28d21c49 100644 --- a/unitTests/CMakeLists.txt +++ b/unitTests/CMakeLists.txt @@ -1,3 +1,5 @@ +find_package(GTest REQUIRED) + add_executable(unit_tests mainTestRunner.cpp gtestwrapper.h test_types.cpp