aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2018-05-04 00:00:26 +0300
committerNirbheek Chauhan <nirbheek.chauhan@gmail.com>2018-05-04 11:46:22 +0000
commit8b9fe0efffae288e83b60fb722a3ec25f96a335a (patch)
tree495e6843dc0128ef06fdac96d1e77d22fabc1dda /mesonbuild
parent211127c834e5399eba11ad7977c85e67e258cf9c (diff)
downloadmeson-8b9fe0efffae288e83b60fb722a3ec25f96a335a.zip
meson-8b9fe0efffae288e83b60fb722a3ec25f96a335a.tar.gz
meson-8b9fe0efffae288e83b60fb722a3ec25f96a335a.tar.bz2
No longer require duplicate gtest header install.
Diffstat (limited to 'mesonbuild')
-rw-r--r--mesonbuild/dependencies/dev.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/mesonbuild/dependencies/dev.py b/mesonbuild/dependencies/dev.py
index eae8ff7..ffd9666 100644
--- a/mesonbuild/dependencies/dev.py
+++ b/mesonbuild/dependencies/dev.py
@@ -48,7 +48,7 @@ class GTestDependency(ExternalDependency):
mlog.log('Dependency GTest found:', mlog.green('YES'), '(prebuilt)')
elif self.detect_srcdir():
self.is_found = True
- self.compile_args = ['-I' + self.src_include_dir]
+ self.compile_args = ['-I' + d for d in self.src_include_dirs]
self.link_args = []
if self.main:
self.sources = [self.all_src, self.main_src]
@@ -67,7 +67,9 @@ class GTestDependency(ExternalDependency):
os.path.join(self.src_dir, 'gtest-all.cc'))
self.main_src = mesonlib.File.from_absolute_file(
os.path.join(self.src_dir, 'gtest_main.cc'))
- self.src_include_dir = os.path.normpath(os.path.join(self.src_dir, '..'))
+ self.src_include_dirs = [os.path.normpath(os.path.join(self.src_dir, '..')),
+ os.path.normpath(os.path.join(self.src_dir, '../include')),
+ ]
return True
return False
@@ -96,7 +98,7 @@ class GMockDependency(ExternalDependency):
# Yes, we need both because there are multiple
# versions of gmock that do different things.
d2 = os.path.normpath(os.path.join(d, '..'))
- self.compile_args = ['-I' + d, '-I' + d2]
+ self.compile_args = ['-I' + d, '-I' + d2, '-I' + os.path.join(d2, 'include')]
self.link_args = []
all_src = mesonlib.File.from_absolute_file(os.path.join(d, 'gmock-all.cc'))
main_src = mesonlib.File.from_absolute_file(os.path.join(d, 'gmock_main.cc'))