From 05912fd65c52f97a600383be11cd741ae32d61bf Mon Sep 17 00:00:00 2001 From: iphydf Date: Fri, 9 Feb 2018 20:36:54 +0000 Subject: [PATCH] Add gtest include directory to -I flags if found. Otherwise it won't be found when cross-compiling. --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9705dcf4..0dc1931b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -441,6 +441,7 @@ if(EXISTS "/usr/src/gtest/src/gtest-all.cc") add_library(gtest /usr/src/gtest/src/gtest-all.cc /usr/src/gtest/src/gtest_main.cc) + include_directories(/usr/src/gtest/include) target_include_directories(gtest PRIVATE /usr/src/gtest) check_cxx_compiler_flag("-w" HAVE_CXX_W QUIET) check_cxx_compiler_flag("-Wno-global-constructors" HAVE_CXX_W_NO_GLOBAL_CONSTRUCTORS QUIET)