fiddle_build_test/gyp: fix mac mesa build (2)
authorhalcanary <halcanary@google.com>
Tue, 19 Apr 2016 15:46:50 +0000 (08:46 -0700)
committerCommit bot <commit-bot@chromium.org>
Tue, 19 Apr 2016 15:46:50 +0000 (08:46 -0700)
TBR=
NOTRY=true

Review URL: https://codereview.chromium.org/1900173002

gyp/tools.gyp

index 6c96ca5..190e1fe 100644 (file)
         ],
       },
     ],
-    ['skia_os in ["linux", "mac"]',
+    ['skia_mesa and skia_os in ["linux", "mac"]',
       {
         'targets': [
           {
               'pdf.gyp:pdf',
             ],
             'defines': [ 'FIDDLE_BUILD_TEST' ],
-            'link_settings': { 'libraries': [ '-lOSMesa' ], },
+            'conditions': [
+              [ 'skia_os == "mac"',
+                {
+                  'link_settings': { 'libraries': [ '/opt/X11/lib/libOSMesa.dylib', ], },
+                  'include_dirs': [ '/opt/X11/include/', ],
+                }, {
+                  'link_settings': { 'libraries': [ '-lOSMesa' ], },
+                }
+              ],
+            ],
           },
         ],
       },