DEPS include_rules no longer allows core/ -> fpsdfsk/ inclusion.
[pdfium.git] / samples / samples.gyp
index 4938ecb..496a274 100644 (file)
@@ -3,6 +3,9 @@
 # found in the LICENSE file.
 
 {
+  'variables': {
+    'pdf_enable_v8%': 1,
+  },
   'target_defaults': {
     'defines' : [
       'PNG_PREFIX',
     ],
     'include_dirs': [
       '<(DEPTH)',
-      '<(DEPTH)/v8',
-      '<(DEPTH)/v8/include',
+    ],
+    'conditions': [
+      ['pdf_enable_v8==1', {
+        'defines': [
+          'PDF_ENABLE_V8',
+        ],
+        'include_dirs': [
+          '<(DEPTH)/v8',
+          '<(DEPTH)/v8/include',
+        ],
+      }],
     ],
   },
   'targets': [
       'dependencies': [
         'fx_lpng',
         '../pdfium.gyp:pdfium',
-        '<(DEPTH)/v8/tools/gyp/v8.gyp:v8_libplatform',
+        # Regardless of whether the library ships against system freetype,
+        # always link this binary against the bundled one for consistency
+        # of results across platforms.
+        '../third_party/third_party.gyp:fx_freetype',
       ],
       'sources': [
         'pdfium_test.cc',
         'image_diff_png.cc',
       ],
+      'link_settings': {
+        'libraries!': [
+          '-lfreetype',
+        ],
+      },
+      'conditions': [
+        ['pdf_enable_v8==1', {
+          'dependencies': [
+            '<(DEPTH)/v8/tools/gyp/v8.gyp:v8_libplatform',
+          ],
+        }],
+      ],
     },
     {
       'target_name': 'pdfium_diff',