Gyp changes for NaCl debugger
authorborenet@google.com <borenet@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Thu, 7 Mar 2013 15:33:28 +0000 (15:33 +0000)
committerborenet@google.com <borenet@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Thu, 7 Mar 2013 15:33:28 +0000 (15:33 +0000)
Review URL: https://codereview.chromium.org/12544011

git-svn-id: http://skia.googlecode.com/svn/trunk@8015 2bbb7eff-a529-9590-31e7-b0007b416f81

gyp/core.gyp
gyp/debugger.gyp
gyp/everything.gyp
gyp/images.gyp
gyp/tests.gyp
gyp/utils.gyp

index 76994e1..479e673 100644 (file)
@@ -83,9 +83,9 @@
             '../src/core/SkMMapStream.cpp',
           ],
         }],
-        [ 'skia_os == "android"', {
+        [ 'skia_os in ("android", "nacl")', {
           'dependencies': [
-             'freetype.gyp:freetype',
+            'freetype.gyp:freetype',
           ],
         }],
         [ 'skia_os == "android" and skia_arch_type == "arm" and armv7 == 1', {
index 9f8b5b3..f2de60e 100644 (file)
       'include_dirs' : [
         '../src/core',
         '../debugger',      # To pull SkDebugger.h
-        '../debugger/QT',   # For all the QT UI Goodies
         '../src/gpu',       # To pull gl/GrGLUtil.h
         '../src/ports',     # To pull SkFontDescriptor.h
         '../bench',
         '../tools',
-        '<@(qt_includes)',
       ],
       'sources': [
-        '../debugger/debuggermain.cpp',
         '../debugger/SkDebugCanvas.h',
         '../debugger/SkDebugCanvas.cpp',
         '../debugger/SkDebugger.cpp',
         '../debugger/SkDrawCommand.cpp',
         '../debugger/SkObjectParser.h',
         '../debugger/SkObjectParser.cpp',
-        '../debugger/QT/SkDebuggerGUI.cpp',
-        '../debugger/QT/SkDebuggerGUI.h',
-        '../debugger/QT/SkCanvasWidget.cpp',
-        '../debugger/QT/SkCanvasWidget.h',
-        '../debugger/QT/SkInspectorWidget.h',
-        '../debugger/QT/SkInspectorWidget.cpp',
-        '../debugger/QT/SkListWidget.h',
-        '../debugger/QT/SkListWidget.cpp',
-        '../debugger/QT/SkSettingsWidget.h',
-        '../debugger/QT/SkSettingsWidget.cpp',
-        '../debugger/QT/SkGLWidget.h',
-        '../debugger/QT/SkGLWidget.cpp',
-        '../debugger/QT/SkRasterWidget.h',
-        '../debugger/QT/SkRasterWidget.cpp',
-        '../debugger/QT/SkImageWidget.h',
-        '../debugger/QT/SkImageWidget.cpp',
-
-        # To update this file edit SkIcons.qrc and rerun rcc to generate cpp
-        '../debugger/QT/qrc_SkIcons.cpp',
-
-        # Generated MOC files
-        '<(moc_gen_dir)/moc_SkCanvasWidget.cpp',
-        '<(moc_gen_dir)/moc_SkDebuggerGUI.cpp',
-        '<(moc_gen_dir)/moc_SkInspectorWidget.cpp',
-        '<(moc_gen_dir)/moc_SkSettingsWidget.cpp',
-        '<(moc_gen_dir)/moc_SkRasterWidget.cpp',
-        '<(moc_gen_dir)/moc_SkImageWidget.cpp',
-        '<(moc_gen_dir)/moc_SkGLWidget.cpp',
       ],
       'dependencies': [
         'skia_base_libs.gyp:skia_base_libs',
         'effects.gyp:effects',
         'bench.gyp:bench_timer',
         'tools.gyp:picture_renderer',
-        'debugger_mocs',
       ],
-      'link_settings': {
-        'libraries': [
-          '<@(qt_libs)',
-        ],
-      },
-    },
-    {
-      'target_name': 'debugger_mocs',
-      'type': 'none',
-      'sources': [
-        '<(moc_src_dir)/SkCanvasWidget.h',
-        '<(moc_src_dir)/SkDebuggerGUI.h',
-        '<(moc_src_dir)/SkInspectorWidget.h',
-        '<(moc_src_dir)/SkSettingsWidget.h',
-        '<(moc_src_dir)/SkRasterWidget.h',
-        '<(moc_src_dir)/SkImageWidget.h',
-        '<(moc_src_dir)/SkGLWidget.h',
+      'conditions': [
+        [ 'skia_os == "nacl"', {
+          'dependencies': [
+            'utils.gyp:utils', # For SkBase64.h
+          ],
+          'include_dirs': [
+            '../src/utils',
+          ],
+          'sources': [
+            '../../nacl/src/nacl_debugger.cpp',
+          ],
+        }, { # skia_os != "nacl"
+          'include_dirs': [
+            '../debugger/QT',   # For all the QT UI Goodies
+            '<@(qt_includes)',
+          ],
+          'sources': [
+            '../debugger/debuggermain.cpp',
+            '../debugger/QT/SkDebuggerGUI.cpp',
+            '../debugger/QT/SkDebuggerGUI.h',
+            '../debugger/QT/SkCanvasWidget.cpp',
+            '../debugger/QT/SkCanvasWidget.h',
+            '../debugger/QT/SkInspectorWidget.h',
+            '../debugger/QT/SkInspectorWidget.cpp',
+            '../debugger/QT/SkListWidget.h',
+            '../debugger/QT/SkListWidget.cpp',
+            '../debugger/QT/SkSettingsWidget.h',
+            '../debugger/QT/SkSettingsWidget.cpp',
+            '../debugger/QT/SkGLWidget.h',
+            '../debugger/QT/SkGLWidget.cpp',
+            '../debugger/QT/SkRasterWidget.h',
+            '../debugger/QT/SkRasterWidget.cpp',
+            '../debugger/QT/SkImageWidget.h',
+            '../debugger/QT/SkImageWidget.cpp',
+    
+            # To update this file edit SkIcons.qrc and rerun rcc to generate cpp
+            '../debugger/QT/qrc_SkIcons.cpp',
+    
+            # Generated MOC files
+            '<(moc_gen_dir)/moc_SkCanvasWidget.cpp',
+            '<(moc_gen_dir)/moc_SkDebuggerGUI.cpp',
+            '<(moc_gen_dir)/moc_SkInspectorWidget.cpp',
+            '<(moc_gen_dir)/moc_SkSettingsWidget.cpp',
+            '<(moc_gen_dir)/moc_SkRasterWidget.cpp',
+            '<(moc_gen_dir)/moc_SkImageWidget.cpp',
+            '<(moc_gen_dir)/moc_SkGLWidget.cpp',
+          ],
+          'dependencies': [
+            'debugger_qt_mocs',
+          ],
+          'link_settings': {
+            'libraries': [
+              '<@(qt_libs)',
+            ],
+          },
+        }],
       ],
-      'rules': [
+    },
+  ],
+  'conditions': [
+    [ 'skia_os != "nacl"', {
+      'targets': [
         {
-          'rule_name': 'generate_moc',
-          'extension': 'h',
-          'outputs': [ '<(moc_gen_dir)/moc_<(RULE_INPUT_ROOT).cpp' ],
-          'action': [ '<(qt_moc)', '-DSK_SUPPORT_GPU=<(skia_gpu)', '<(RULE_INPUT_PATH)', '-o', '<(moc_gen_dir)/moc_<(RULE_INPUT_ROOT).cpp' ],
-          'message': 'Generating <(RULE_INPUT_ROOT).cpp.',
+          'target_name': 'debugger_qt_mocs',
+          'type': 'none',
+          'sources': [
+            '<(moc_src_dir)/SkCanvasWidget.h',
+            '<(moc_src_dir)/SkDebuggerGUI.h',
+            '<(moc_src_dir)/SkInspectorWidget.h',
+            '<(moc_src_dir)/SkSettingsWidget.h',
+            '<(moc_src_dir)/SkRasterWidget.h',
+            '<(moc_src_dir)/SkImageWidget.h',
+            '<(moc_src_dir)/SkGLWidget.h',
+          ],
+          'rules': [
+            {
+              'rule_name': 'generate_moc',
+              'extension': 'h',
+              'outputs': [ '<(moc_gen_dir)/moc_<(RULE_INPUT_ROOT).cpp' ],
+              'action': [ '<(qt_moc)', '-DSK_SUPPORT_GPU=<(skia_gpu)',
+                          '<(RULE_INPUT_PATH)',
+                          '-o', '<(moc_gen_dir)/moc_<(RULE_INPUT_ROOT).cpp' ],
+              'message': 'Generating <(RULE_INPUT_ROOT).cpp.',
+            },
+          ],
         },
       ],
-    },
+    }],
   ],
 }
 
index e1d516d..000bb78 100644 (file)
@@ -14,7 +14,7 @@
       'type': 'none',
       'dependencies': ['most.gyp:most'],
       'conditions': [
-        ['skia_os in ("ios", "android", "nacl") or (skia_os == "mac" and skia_arch_width == 32)', {
+        ['skia_os in ("ios", "android") or (skia_os == "mac" and skia_arch_width == 32)', {
           # debugger is not supported on this platform
         }, {
           'dependencies': [ 'debugger.gyp:debugger' ],
index 4560980..b5447a2 100644 (file)
             ],
             'libraries': [
               '-lpng',
+              '-lz',
             ],
           },
           # end libpng stuff
index 6d6998b..dbf27fa 100644 (file)
             '../src/gpu',
           ],
         }],
+        [ 'skia_os == "nacl"', {
+          # CityHash is not supported on NaCl because the NaCl toolchain is
+          # missing byteswap.h which is needed by CityHash.
+          # TODO(borenet): Find a way to either provide this dependency or
+          # replace it.
+          'sources!': [
+            '../tests/ChecksumTest.cpp',
+          ],
+        }],
       ],
     },
   ],
index 3b129d3..ab725df 100644 (file)
           ],
           'sources!': [
             '../src/utils/SkThreadUtils_pthread_linux.cpp',
+            '../src/utils/SkCityHash.cpp',
+            '../src/utils/SkCityHash.h',
+          ],
+          'dependencies!': [
+            # CityHash is not supported on NaCl because the NaCl toolchain is
+            # missing byteswap.h which is needed by CityHash.
+            # TODO(borenet): Find a way to either provide this dependency or
+            # replace it.
+            'cityhash',
           ],
         }],
         [ 'skia_os == "android"', {