cmake: check for include in /usr/include also

libgtest-dev_1.6.0 shipped by trusty puts the headers in /usr/include

Signed-off-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
Kefu Chai 2017-10-18 15:59:29 +08:00
parent 93f760c57c
commit ee15ced3e9

View File

@ -8,8 +8,12 @@ macro(_build_gtest gtest_root)
LOG_BUILD ON)
ExternalProject_Get_Property(googletest source_dir)
set(GTEST_INCLUDE_DIRS ${source_dir}/googletest/include)
set(GMOCK_INCLUDE_DIRS ${source_dir}/googlemock/include)
find_path(GTEST_INCLUDE_DIRS
NAMES gtest/gtest.h
PATHS ${source_dir}/googletest/include /usr/include)
find_path(GMOCK_INCLUDE_DIRS
NAMES gmock/gmock.h
PATHS ${source_dir}/googlemock/include /usr/include)
find_package(Threads REQUIRED)