blob: 749cd5e5ebb9de824c2ceceeb59503265c5a86c9 [file] [log] [blame]
chudy@google.com902ebe52012-06-29 14:21:22 +00001{
fmalita@google.combacfcfb2012-09-27 13:34:34 +00002 'variables': {
robertphillipseb3379f2014-12-17 11:27:47 -08003 'skia_warnings_as_errors': 0,
fmalita@google.combacfcfb2012-09-27 13:34:34 +00004 'conditions': [
borenet@google.com05d550e2013-06-11 15:52:19 +00005 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "chromeos"]', {
fmalita@google.combacfcfb2012-09-27 13:34:34 +00006 # Use the systemwide Qt libs by default
7 'variables': {
8 'qt_sdk%': '/usr',
9 },
10 'qt_sdk': '<(qt_sdk)',
11 'qt_moc%': 'moc',
12 'qt_includes': [
13 '<(qt_sdk)/include',
14 '<(qt_sdk)/include/QtCore',
15 '<(qt_sdk)/include/QtGui',
16 '<(qt_sdk)/include/QtOpenGL',
17
18 # Systemwide Qt libs are not contained under a single tree,
19 # so we're adding package-qualified paths as a fallback.
20 '<(qt_sdk)/include/qt4',
21 '<(qt_sdk)/include/qt4/QtCore',
22 '<(qt_sdk)/include/qt4/QtGui',
23 '<(qt_sdk)/include/qt4/QtOpenGL',
24 ],
25 'qt_libs': [
26 '-lQtCore',
27 '-lQtGui',
28 '-lQtOpenGL'
29 ],
30 }],
31 [ 'skia_os == "mac"', {
32 # Use the systemwide Qt libs by default
33 'variables': {
34 'qt_sdk%': '/Library/Frameworks',
35 },
36 'qt_sdk': '<(qt_sdk)',
37 'qt_moc%': 'moc',
38 'qt_includes': [
39 '<(qt_sdk)/QtCore.framework/Headers/',
40 '<(qt_sdk)/QtGui.framework/Headers/',
41 '<(qt_sdk)/QtOpenGL.framework/Headers/',
42 ],
43 'qt_libs': [
44 '<(qt_sdk)/QtCore.framework',
45 '<(qt_sdk)/QtGui.framework',
46 '<(qt_sdk)/QtOpenGL.framework',
47 ],
48 }],
49 [ 'skia_os == "win"', {
50 'variables': {
bsalomon@google.comd9804782012-10-11 14:33:10 +000051 # This is the default location for the version of Qt current on 10/11/12
52 'qt_sdk%': 'C:/Qt/4.8.3/',
fmalita@google.combacfcfb2012-09-27 13:34:34 +000053 },
54 'qt_sdk': '<(qt_sdk)',
55 'qt_moc%': '<(qt_sdk)/bin/moc',
56 'qt_includes': [
57 '<(qt_sdk)/include',
58 '<(qt_sdk)/include/QtCore',
59 '<(qt_sdk)/include/QtGui',
60 '<(qt_sdk)/include/QtOpenGL',
61 ],
62 'qt_libs': [
63 '<(qt_sdk)/lib/QtCore4.lib',
64 '<(qt_sdk)/lib/QtGui4.lib',
bsalomon@google.comd9804782012-10-11 14:33:10 +000065 '<(qt_sdk)/lib/QtOpenGL4.lib',
fmalita@google.combacfcfb2012-09-27 13:34:34 +000066 ],
67 }],
68 ],
69 'moc_src_dir': '../debugger/QT',
bungeman@google.comb3e77942012-10-15 14:31:29 +000070 'moc_gen_dir': '<(SHARED_INTERMEDIATE_DIR)/debugger/QT',
fmalita@google.combacfcfb2012-09-27 13:34:34 +000071 },
chudy@google.com902ebe52012-06-29 14:21:22 +000072 'targets': [
73 {
74 'target_name': 'debugger',
75 'type': 'executable',
fmalita@google.combacfcfb2012-09-27 13:34:34 +000076 'mac_bundle': 1,
77 'mac_framework_dirs': [
78 '/Library/Frameworks',
79 ],
chudy@google.com902ebe52012-06-29 14:21:22 +000080 'include_dirs' : [
81 '../src/core',
fmalita@google.com4df16732013-06-13 21:25:45 +000082 '../src/utils/debugger',
fmalita@google.combacfcfb2012-09-27 13:34:34 +000083 '../debugger', # To pull SkDebugger.h
fmalita@google.combacfcfb2012-09-27 13:34:34 +000084 '../src/gpu', # To pull gl/GrGLUtil.h
humper@google.comf515ffc2013-01-07 15:48:19 +000085 '../src/ports', # To pull SkFontDescriptor.h
robertphillips@google.com2bde91d2012-11-15 14:57:57 +000086 '../bench',
87 '../tools',
chudy@google.com902ebe52012-06-29 14:21:22 +000088 ],
89 'sources': [
chudy@google.com902ebe52012-06-29 14:21:22 +000090 '../debugger/SkDebugger.cpp',
robertphillips@google.com35349d82013-09-18 13:28:10 +000091 '../src/utils/debugger/SkDebugCanvas.h',
92 '../src/utils/debugger/SkDebugCanvas.cpp',
93 '../src/utils/debugger/SkDrawCommand.h',
94 '../src/utils/debugger/SkDrawCommand.cpp',
95 '../src/utils/debugger/SkObjectParser.h',
96 '../src/utils/debugger/SkObjectParser.cpp',
chudy@google.com902ebe52012-06-29 14:21:22 +000097 ],
98 'dependencies': [
djsollen@google.com52f02972013-06-03 12:10:19 +000099 'skia_lib.gyp:skia_lib',
robertphillips@google.com2bde91d2012-11-15 14:57:57 +0000100 'tools.gyp:picture_renderer',
mtklein9ac68ee2014-06-20 11:29:20 -0700101 'tools.gyp:timer',
chudy@google.com902ebe52012-06-29 14:21:22 +0000102 ],
borenet@google.com327b9b22013-03-07 15:33:28 +0000103 'conditions': [
104 [ 'skia_os == "nacl"', {
borenet@google.com327b9b22013-03-07 15:33:28 +0000105 'include_dirs': [
106 '../src/utils',
107 ],
108 'sources': [
borenet@google.com6a98b8c2013-05-06 12:50:00 +0000109 '../platform_tools/nacl/src/nacl_debugger.cpp',
borenet@google.com327b9b22013-03-07 15:33:28 +0000110 ],
111 }, { # skia_os != "nacl"
112 'include_dirs': [
113 '../debugger/QT', # For all the QT UI Goodies
114 '<@(qt_includes)',
115 ],
116 'sources': [
117 '../debugger/debuggermain.cpp',
118 '../debugger/QT/SkDebuggerGUI.cpp',
119 '../debugger/QT/SkDebuggerGUI.h',
120 '../debugger/QT/SkCanvasWidget.cpp',
121 '../debugger/QT/SkCanvasWidget.h',
122 '../debugger/QT/SkInspectorWidget.h',
123 '../debugger/QT/SkInspectorWidget.cpp',
124 '../debugger/QT/SkListWidget.h',
125 '../debugger/QT/SkListWidget.cpp',
126 '../debugger/QT/SkSettingsWidget.h',
127 '../debugger/QT/SkSettingsWidget.cpp',
128 '../debugger/QT/SkGLWidget.h',
129 '../debugger/QT/SkGLWidget.cpp',
130 '../debugger/QT/SkRasterWidget.h',
131 '../debugger/QT/SkRasterWidget.cpp',
132 '../debugger/QT/SkImageWidget.h',
133 '../debugger/QT/SkImageWidget.cpp',
skia.committer@gmail.com754a3eb2013-03-08 07:01:25 +0000134
borenet@google.com327b9b22013-03-07 15:33:28 +0000135 # To update this file edit SkIcons.qrc and rerun rcc to generate cpp
136 '../debugger/QT/qrc_SkIcons.cpp',
skia.committer@gmail.com754a3eb2013-03-08 07:01:25 +0000137
borenet@google.com327b9b22013-03-07 15:33:28 +0000138 # Generated MOC files
139 '<(moc_gen_dir)/moc_SkCanvasWidget.cpp',
140 '<(moc_gen_dir)/moc_SkDebuggerGUI.cpp',
141 '<(moc_gen_dir)/moc_SkInspectorWidget.cpp',
142 '<(moc_gen_dir)/moc_SkSettingsWidget.cpp',
143 '<(moc_gen_dir)/moc_SkRasterWidget.cpp',
144 '<(moc_gen_dir)/moc_SkImageWidget.cpp',
145 '<(moc_gen_dir)/moc_SkGLWidget.cpp',
146 ],
commit-bot@chromium.orgd08d23b2014-01-08 21:16:14 +0000147 'cflags': [
148 # Clang gets confused by QWeakPointer, see http://llvm.org/bugs/show_bug.cgi?id=13127
149 '-Wno-uninitialized',
150 ],
borenet@google.com327b9b22013-03-07 15:33:28 +0000151 'dependencies': [
152 'debugger_qt_mocs',
153 ],
154 'link_settings': {
155 'libraries': [
156 '<@(qt_libs)',
157 ],
158 },
159 }],
160 ],
fmalita@google.combacfcfb2012-09-27 13:34:34 +0000161 },
borenet@google.com327b9b22013-03-07 15:33:28 +0000162 ],
163 'conditions': [
164 [ 'skia_os != "nacl"', {
165 'targets': [
fmalita@google.combacfcfb2012-09-27 13:34:34 +0000166 {
borenet@google.com327b9b22013-03-07 15:33:28 +0000167 'target_name': 'debugger_qt_mocs',
168 'type': 'none',
169 'sources': [
170 '<(moc_src_dir)/SkCanvasWidget.h',
171 '<(moc_src_dir)/SkDebuggerGUI.h',
172 '<(moc_src_dir)/SkInspectorWidget.h',
173 '<(moc_src_dir)/SkSettingsWidget.h',
174 '<(moc_src_dir)/SkRasterWidget.h',
175 '<(moc_src_dir)/SkImageWidget.h',
176 '<(moc_src_dir)/SkGLWidget.h',
177 ],
178 'rules': [
179 {
180 'rule_name': 'generate_moc',
181 'extension': 'h',
182 'outputs': [ '<(moc_gen_dir)/moc_<(RULE_INPUT_ROOT).cpp' ],
183 'action': [ '<(qt_moc)', '-DSK_SUPPORT_GPU=<(skia_gpu)',
184 '<(RULE_INPUT_PATH)',
185 '-o', '<(moc_gen_dir)/moc_<(RULE_INPUT_ROOT).cpp' ],
186 'message': 'Generating <(RULE_INPUT_ROOT).cpp.',
187 },
188 ],
fmalita@google.combacfcfb2012-09-27 13:34:34 +0000189 },
190 ],
borenet@google.com327b9b22013-03-07 15:33:28 +0000191 }],
chudy@google.com902ebe52012-06-29 14:21:22 +0000192 ],
193}