Skip to content

Commit cbb991c

Browse files
committed
fixed link issue with GTest
1 parent 8fa402f commit cbb991c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ endif()
4343

4444
if(${CMAKE_PROJECT_NAME}_USE_GTEST)
4545
find_package(GTest REQUIRED)
46+
include_directories(${GTEST_INCLUDE_DIRS})
4647

4748
if(${CMAKE_PROJECT_NAME}_USE_GOOGLE_MOCK)
4849
set(GOOGLE_MOCK_LIBRARIES GTest::gmock GTest::gmock_main)
@@ -51,8 +52,7 @@ if(${CMAKE_PROJECT_NAME}_USE_GTEST)
5152
target_link_libraries(
5253
${PROJECT_NAME}
5354
PUBLIC
54-
GTest::gtest
55-
GTest::gtest_main
55+
gtest
5656
${GOOGLE_MOCK_LIBRARIES}
5757
Project
5858
)

0 commit comments

Comments
 (0)