Add gtest include directory to -I flags if found.

Otherwise it won't be found when cross-compiling.
This commit is contained in:
iphydf 2018-02-09 20:36:54 +00:00
parent a940f26293
commit 05912fd65c
No known key found for this signature in database
GPG Key ID: 3855DBA2D74403C9

View File

@ -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)