Skip to content

Commit

Permalink
Use CMake config mode for gMock detection
Browse files Browse the repository at this point in the history
  • Loading branch information
kmilos authored and neheb committed Jul 21, 2023
1 parent 3e8e09d commit 562ef57
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions unitTests/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
find_package(GTest REQUIRED)
# Prefer using Google supplied CMake config as built-in module is buggy before 3.23
find_package(GTest CONFIG)
if(NOT GTest_FOUND)
find_package(GTest REQUIRED)
endif()

# video support.
if( EXV_ENABLE_VIDEO )
Expand Down Expand Up @@ -44,7 +48,7 @@ target_compile_definitions(unit_tests
target_link_libraries(unit_tests
PRIVATE
exiv2lib
GTest::gtest_main
GTest::gmock_main
std::filesystem
)

Expand Down

0 comments on commit 562ef57

Please sign in to comment.