From e22eafd00df1abe177dfe508322f3310f4a2a00f Mon Sep 17 00:00:00 2001 From: Jannik ZANDER Date: Fri, 10 Feb 2017 19:24:17 +0100 Subject: [PATCH] Fix gtest_main target --- AddUnitTest.cmake | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/AddUnitTest.cmake b/AddUnitTest.cmake index da74bf9..05f52ff 100644 --- a/AddUnitTest.cmake +++ b/AddUnitTest.cmake @@ -40,8 +40,7 @@ function(add_unittest) foreach(inc ${my_INCS}) target_include_directories(${my_TARGET} PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/${inc}") endforeach() - target_include_directories(${my_TARGET} PUBLIC "${GTEST_INCLUDE_DIRS}") - target_link_libraries(${my_TARGET} PUBLIC "${my_DEPS}" ${GTEST_BOTH_LIBRARIES}) + target_link_libraries(${my_TARGET} PUBLIC "${my_DEPS}" gtest gtest_main) # Add test to test suite add_test(${my_TARGET} ${my_TARGET}) -- 2.43.0