On Sun, Apr 29, 2018 at 07:41:26AM -0500, Steve M. Robbins wrote:

> 1. Modify the build to look for headers in /usr/src/googletest.

Below is a patch to achieve this.

--- meson-0.46.0.orig/mesonbuild/dependencies/dev.py    2018-03-03 
16:02:02.000000000 -0600
+++ meson-0.46.0/mesonbuild/dependencies/dev.py 2018-05-01 21:51:41.737194014 
-0500
@@ -48,7 +48,7 @@
             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,7 @@
                     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 +96,7 @@
                 # 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' + 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'))


The build-dependencies need adjusting as follows.


--- meson-0.46.0.orig/debian/control    2018-04-22 11:42:22.000000000 -0500
+++ meson-0.46.0/debian/control 2018-05-01 22:03:25.962608495 -0500
@@ -21,8 +21,7 @@
   gobjc++ <!nocheck>,
   gnustep-make <!nocheck>,
   libgnustep-base-dev <!nocheck>,
-  libgtest-dev <!nocheck>,
-  google-mock <!nocheck>,
+  googletest <!nocheck>,
   qtbase5-dev <!nocheck>,
   qtbase5-dev-tools <!nocheck>,
   qttools5-dev-tools <!nocheck>,

-Steve

Attachment: signature.asc
Description: PGP signature

Reply via email to