blob: 9cce342330325cbc6561b38b2e1da6a03cca74e1 [file] [log] [blame]
scroggo3e562272015-03-25 10:22:41 -07001# Copyright 2015 Google Inc.
2#
3# Use of this source code is governed by a BSD-style license that can be
4# found in the LICENSE file.
chudy@google.com902ebe52012-06-29 14:21:22 +00005{
fmalita@google.combacfcfb2012-09-27 13:34:34 +00006 'variables': {
robertphillipseb3379f2014-12-17 11:27:47 -08007 'skia_warnings_as_errors': 0,
fmalita@google.combacfcfb2012-09-27 13:34:34 +00008 'conditions': [
borenet43bf5112016-04-29 14:01:34 -07009 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris"]', {
fmalita@google.combacfcfb2012-09-27 13:34:34 +000010 # Use the systemwide Qt libs by default
11 'variables': {
12 'qt_sdk%': '/usr',
13 },
14 'qt_sdk': '<(qt_sdk)',
15 'qt_moc%': 'moc',
16 'qt_includes': [
17 '<(qt_sdk)/include',
18 '<(qt_sdk)/include/QtCore',
19 '<(qt_sdk)/include/QtGui',
20 '<(qt_sdk)/include/QtOpenGL',
21
22 # Systemwide Qt libs are not contained under a single tree,
23 # so we're adding package-qualified paths as a fallback.
24 '<(qt_sdk)/include/qt4',
25 '<(qt_sdk)/include/qt4/QtCore',
26 '<(qt_sdk)/include/qt4/QtGui',
27 '<(qt_sdk)/include/qt4/QtOpenGL',
28 ],
29 'qt_libs': [
30 '-lQtCore',
31 '-lQtGui',
32 '-lQtOpenGL'
33 ],
34 }],
35 [ 'skia_os == "mac"', {
36 # Use the systemwide Qt libs by default
37 'variables': {
38 'qt_sdk%': '/Library/Frameworks',
39 },
40 'qt_sdk': '<(qt_sdk)',
41 'qt_moc%': 'moc',
42 'qt_includes': [
43 '<(qt_sdk)/QtCore.framework/Headers/',
44 '<(qt_sdk)/QtGui.framework/Headers/',
45 '<(qt_sdk)/QtOpenGL.framework/Headers/',
46 ],
47 'qt_libs': [
48 '<(qt_sdk)/QtCore.framework',
49 '<(qt_sdk)/QtGui.framework',
50 '<(qt_sdk)/QtOpenGL.framework',
51 ],
52 }],
53 [ 'skia_os == "win"', {
54 'variables': {
bsalomon@google.comd9804782012-10-11 14:33:10 +000055 # This is the default location for the version of Qt current on 10/11/12
robertphillips9ea8acd2016-03-01 09:34:38 -080056 'qt_sdk%': 'C:/Qt/4.8.6/',
fmalita@google.combacfcfb2012-09-27 13:34:34 +000057 },
58 'qt_sdk': '<(qt_sdk)',
59 'qt_moc%': '<(qt_sdk)/bin/moc',
60 'qt_includes': [
61 '<(qt_sdk)/include',
62 '<(qt_sdk)/include/QtCore',
63 '<(qt_sdk)/include/QtGui',
64 '<(qt_sdk)/include/QtOpenGL',
65 ],
66 'qt_libs': [
67 '<(qt_sdk)/lib/QtCore4.lib',
68 '<(qt_sdk)/lib/QtGui4.lib',
bsalomon@google.comd9804782012-10-11 14:33:10 +000069 '<(qt_sdk)/lib/QtOpenGL4.lib',
fmalita@google.combacfcfb2012-09-27 13:34:34 +000070 ],
71 }],
72 ],
73 'moc_src_dir': '../debugger/QT',
bungeman@google.comb3e77942012-10-15 14:31:29 +000074 'moc_gen_dir': '<(SHARED_INTERMEDIATE_DIR)/debugger/QT',
fmalita@google.combacfcfb2012-09-27 13:34:34 +000075 },
chudy@google.com902ebe52012-06-29 14:21:22 +000076 'targets': [
77 {
78 'target_name': 'debugger',
79 'type': 'executable',
fmalita@google.combacfcfb2012-09-27 13:34:34 +000080 'mac_bundle': 1,
81 'mac_framework_dirs': [
82 '/Library/Frameworks',
83 ],
chudy@google.com902ebe52012-06-29 14:21:22 +000084 'include_dirs' : [
mtkleincd1f2da2015-07-28 08:55:14 -070085 '../include/private',
chudy@google.com902ebe52012-06-29 14:21:22 +000086 '../src/core',
ethannicholas3cb95422016-02-09 12:44:06 -080087 '../tools/debugger',
fmalita@google.combacfcfb2012-09-27 13:34:34 +000088 '../debugger', # To pull SkDebugger.h
fmalita@google.combacfcfb2012-09-27 13:34:34 +000089 '../src/gpu', # To pull gl/GrGLUtil.h
humper@google.comf515ffc2013-01-07 15:48:19 +000090 '../src/ports', # To pull SkFontDescriptor.h
robertphillips@google.com2bde91d2012-11-15 14:57:57 +000091 '../bench',
92 '../tools',
borenet48087572015-04-02 12:16:36 -070093 '../debugger/QT', # For all the QT UI Goodies
94 '<@(qt_includes)',
chudy@google.com902ebe52012-06-29 14:21:22 +000095 ],
96 'sources': [
chudy@google.com902ebe52012-06-29 14:21:22 +000097 '../debugger/SkDebugger.cpp',
ethannicholas3cb95422016-02-09 12:44:06 -080098 '../tools/debugger/SkDebugCanvas.h',
99 '../tools/debugger/SkDebugCanvas.cpp',
100 '../tools/debugger/SkDrawCommand.h',
101 '../tools/debugger/SkDrawCommand.cpp',
brianosmanfad98562016-05-04 11:06:28 -0700102 '../tools/debugger/SkJsonWriteBuffer.h',
103 '../tools/debugger/SkJsonWriteBuffer.cpp',
ethannicholas3cb95422016-02-09 12:44:06 -0800104 '../tools/debugger/SkObjectParser.h',
105 '../tools/debugger/SkObjectParser.cpp',
borenet48087572015-04-02 12:16:36 -0700106 '../debugger/debuggermain.cpp',
107 '../debugger/QT/SkDebuggerGUI.cpp',
108 '../debugger/QT/SkDebuggerGUI.h',
109 '../debugger/QT/SkDrawCommandGeometryWidget.h',
110 '../debugger/QT/SkDrawCommandGeometryWidget.cpp',
111 '../debugger/QT/SkCanvasWidget.cpp',
112 '../debugger/QT/SkCanvasWidget.h',
113 '../debugger/QT/SkInspectorWidget.h',
114 '../debugger/QT/SkInspectorWidget.cpp',
115 '../debugger/QT/SkListWidget.h',
116 '../debugger/QT/SkListWidget.cpp',
117 '../debugger/QT/SkSettingsWidget.h',
118 '../debugger/QT/SkSettingsWidget.cpp',
119 '../debugger/QT/SkGLWidget.h',
120 '../debugger/QT/SkGLWidget.cpp',
121 '../debugger/QT/SkRasterWidget.h',
122 '../debugger/QT/SkRasterWidget.cpp',
123
124 # To update this file edit SkIcons.qrc and rerun rcc to generate cpp
125 '../debugger/QT/qrc_SkIcons.cpp',
126
127 # Generated MOC files
128 '<(moc_gen_dir)/moc_SkCanvasWidget.cpp',
129 '<(moc_gen_dir)/moc_SkDebuggerGUI.cpp',
130 '<(moc_gen_dir)/moc_SkDrawCommandGeometryWidget.cpp',
131 '<(moc_gen_dir)/moc_SkInspectorWidget.cpp',
132 '<(moc_gen_dir)/moc_SkSettingsWidget.cpp',
133 '<(moc_gen_dir)/moc_SkRasterWidget.cpp',
134 '<(moc_gen_dir)/moc_SkGLWidget.cpp',
chudy@google.com902ebe52012-06-29 14:21:22 +0000135 ],
136 'dependencies': [
borenet48087572015-04-02 12:16:36 -0700137 'debugger_qt_mocs',
djsollen@google.com52f02972013-06-03 12:10:19 +0000138 'skia_lib.gyp:skia_lib',
ethannicholas50a8dd02016-02-10 05:40:46 -0800139 'jsoncpp.gyp:jsoncpp',
ethannicholasf67531f2016-03-21 10:19:39 -0700140 'libpng.gyp:libpng',
msaretta5cf4f42016-06-30 10:06:51 -0700141 'tools.gyp:picture_utils',
jbromanbbfe47b2016-02-12 11:29:23 -0800142 'tools.gyp:url_data_manager',
chudy@google.com902ebe52012-06-29 14:21:22 +0000143 ],
borenet48087572015-04-02 12:16:36 -0700144 'cflags': [
145 # Clang gets confused by QWeakPointer, see http://llvm.org/bugs/show_bug.cgi?id=13127
146 '-Wno-uninitialized',
borenet@google.com327b9b22013-03-07 15:33:28 +0000147 ],
borenet48087572015-04-02 12:16:36 -0700148 'link_settings': {
149 'libraries': [
150 '<@(qt_libs)',
151 ],
152 },
fmalita@google.combacfcfb2012-09-27 13:34:34 +0000153 },
borenet48087572015-04-02 12:16:36 -0700154 {
155 'target_name': 'debugger_qt_mocs',
156 'type': 'none',
157 'sources': [
158 '<(moc_src_dir)/SkCanvasWidget.h',
159 '<(moc_src_dir)/SkDebuggerGUI.h',
160 '<(moc_src_dir)/SkDrawCommandGeometryWidget.h',
161 '<(moc_src_dir)/SkInspectorWidget.h',
162 '<(moc_src_dir)/SkSettingsWidget.h',
163 '<(moc_src_dir)/SkRasterWidget.h',
164 '<(moc_src_dir)/SkGLWidget.h',
165 ],
166 'rules': [
fmalita@google.combacfcfb2012-09-27 13:34:34 +0000167 {
borenet48087572015-04-02 12:16:36 -0700168 'rule_name': 'generate_moc',
169 'extension': 'h',
170 'outputs': [ '<(moc_gen_dir)/moc_<(RULE_INPUT_ROOT).cpp' ],
171 'action': [ '<(qt_moc)', '-DSK_SUPPORT_GPU=<(skia_gpu)',
172 '<(RULE_INPUT_PATH)',
173 '-o', '<(moc_gen_dir)/moc_<(RULE_INPUT_ROOT).cpp' ],
174 'message': 'Generating <(RULE_INPUT_ROOT).cpp.',
fmalita@google.combacfcfb2012-09-27 13:34:34 +0000175 },
176 ],
borenet48087572015-04-02 12:16:36 -0700177 },
chudy@google.com902ebe52012-06-29 14:21:22 +0000178 ],
179}