Skip to content

Commit 8e3ef4b

Browse files
authored
Fix link to GTest if GTest is found via find_package
1 parent bf9c71d commit 8e3ef4b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

test/CMakeLists.txt

+1-2
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ endif()
3434
# small helper function
3535
function(manif_add_gtest target)
3636
add_executable(${target} ${ARGN})
37-
add_dependencies(${target} gtest)
38-
target_link_libraries(${target} ${PROJECT_NAME} gtest)
37+
target_link_libraries(${target} ${PROJECT_NAME} GTest::gtest)
3938

4039
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
4140
# GCC is not strict enough by default, so enable most of the warnings.

0 commit comments

Comments
 (0)