forked from baldurk/renderdoc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
qrenderdoc.pro
334 lines (291 loc) · 11.7 KB
/
qrenderdoc.pro
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
#-------------------------------------------------
#
# Project created by QtCreator 2015-03-18T20:10:50
#
#-------------------------------------------------
QT += core gui widgets
CONFIG += silent
lessThan(QT_MAJOR_VERSION, 5): error("requires Qt 5")
equals(QT_MAJOR_VERSION, 5): lessThan(QT_MINOR_VERSION, 6): error("requires Qt 5.6")
TARGET = qrenderdoc
TEMPLATE = app
# include path for core renderdoc API
INCLUDEPATH += $$_PRO_FILE_PWD_/../renderdoc/api/replay
# Allow includes relative to the root
INCLUDEPATH += $$_PRO_FILE_PWD_/
# For ToolWindowManager
INCLUDEPATH += $$_PRO_FILE_PWD_/3rdparty/toolwindowmanager
# For FlowLayout
INCLUDEPATH += $$_PRO_FILE_PWD_/3rdparty/flowlayout
# For Scintilla
INCLUDEPATH += $$_PRO_FILE_PWD_/3rdparty/scintilla/include/qt
INCLUDEPATH += $$_PRO_FILE_PWD_/3rdparty/scintilla/include
# Different output folders per platform
win32 {
RC_INCLUDEPATH = $$_PRO_FILE_PWD_/../renderdoc/api/replay
RC_FILE = Resources/qrenderdoc.rc
# generate pdb files even in release
QMAKE_LFLAGS_RELEASE+=/MAP
QMAKE_CFLAGS_RELEASE += /Zi
QMAKE_LFLAGS_RELEASE +=/debug /opt:ref
!contains(QMAKE_TARGET.arch, x86_64) {
Debug:DESTDIR = $$_PRO_FILE_PWD_/../Win32/Development
Release:DESTDIR = $$_PRO_FILE_PWD_/../Win32/Release
} else {
Debug:DESTDIR = $$_PRO_FILE_PWD_/../x64/Development
Release:DESTDIR = $$_PRO_FILE_PWD_/../x64/Release
}
# Run SWIG here, since normally we run it from VS
swig.name = SWIG ${QMAKE_FILE_IN}
swig.input = SWIGSOURCES
swig.output = ${QMAKE_FILE_BASE}_python.cxx
swig.commands = $$_PRO_FILE_PWD_/3rdparty/swig/swig.exe -v -Wextra -Werror -O -c++ -python -modern -modernargs -enumclass -fastunpack -py3 -builtin -I$$_PRO_FILE_PWD_ -I$$_PRO_FILE_PWD_/../renderdoc/api/replay -outdir . -o ${QMAKE_FILE_BASE}_python.cxx ${QMAKE_FILE_IN}
swig.CONFIG += target_predeps
swig.variable_out = GENERATED_SOURCES
silent:swig.commands = @echo SWIG ${QMAKE_FILE_IN} && $$swig.commands
QMAKE_EXTRA_COMPILERS += swig
SWIGSOURCES += Code/pyrenderdoc/renderdoc.i
SWIGSOURCES += Code/pyrenderdoc/qrenderdoc.i
# Embed renderdoc.py and qrenderdoc.py
RC_DEFINES = RENDERDOC_PY_PATH=renderdoc.py
RC_DEFINES += QRENDERDOC_PY_PATH=qrenderdoc.py
# Include and link against python
INCLUDEPATH += $$_PRO_FILE_PWD_/3rdparty/python/include
!contains(QMAKE_TARGET.arch, x86_64) {
LIBS += $$_PRO_FILE_PWD_/3rdparty/python/Win32/python36.lib
} else {
LIBS += $$_PRO_FILE_PWD_/3rdparty/python/x64/python36.lib
}
# Include and link against PySide2
DEFINES += PYSIDE2_ENABLED=1
INCLUDEPATH += $$_PRO_FILE_PWD_/3rdparty/pyside/include/shiboken2
INCLUDEPATH += $$_PRO_FILE_PWD_/3rdparty/pyside/include/PySide2
INCLUDEPATH += $$_PRO_FILE_PWD_/3rdparty/pyside/include/PySide2/QtCore
INCLUDEPATH += $$_PRO_FILE_PWD_/3rdparty/pyside/include/PySide2/QtGui
INCLUDEPATH += $$_PRO_FILE_PWD_/3rdparty/pyside/include/PySide2/QtWidgets
!contains(QMAKE_TARGET.arch, x86_64) {
LIBS += $$_PRO_FILE_PWD_/3rdparty/pyside/Win32/shiboken2.lib
} else {
LIBS += $$_PRO_FILE_PWD_/3rdparty/pyside/x64/shiboken2.lib
}
# Link against the core library
LIBS += $$DESTDIR/renderdoc.lib
QMAKE_CXXFLAGS_WARN_ON -= -w34100
DEFINES += RENDERDOC_PLATFORM_WIN32
} else {
isEmpty(CMAKE_DIR) {
error("When run from outside CMake, please set the Build Environment Variable CMAKE_DIR to point to your CMake build root. In Qt Creator add CMAKE_DIR=/path/to/renderdoc/build under 'Additional arguments' in the qmake Build Step. If running qmake directly, add CMAKE_DIR=/path/to/renderdoc/build/ to the command line.")
}
DESTDIR=$$CMAKE_DIR/bin
include($$CMAKE_DIR/qrenderdoc/qrenderdoc_cmake.pri)
# Temp files into .obj
MOC_DIR = .obj
UI_DIR = .obj
RCC_DIR = .obj
OBJECTS_DIR = .obj
# Link against the core library
LIBS += -lrenderdoc
QMAKE_LFLAGS += '-Wl,-rpath,\'\$$ORIGIN\',-rpath,\'\$$ORIGIN/../lib\''
# Add the SWIG files that were generated in cmake
SOURCES += $$CMAKE_DIR/qrenderdoc/renderdoc_python.cxx
SOURCES += $$CMAKE_DIR/qrenderdoc/renderdoc.py.c
SOURCES += $$CMAKE_DIR/qrenderdoc/qrenderdoc_python.cxx
SOURCES += $$CMAKE_DIR/qrenderdoc/qrenderdoc.py.c
CONFIG += warn_off
CONFIG += c++14
QMAKE_CFLAGS_WARN_OFF -= -w
QMAKE_CXXFLAGS_WARN_OFF -= -w
macx: {
DEFINES += RENDERDOC_PLATFORM_POSIX RENDERDOC_PLATFORM_APPLE
ICON = $$OSX_ICONFILE
INFO_PLIST_PATH = $$shell_quote($$DESTDIR/$${TARGET}.app/Contents/Info.plist)
QMAKE_POST_LINK += /usr/libexec/PlistBuddy -c \"Add :CFBundleShortVersionString string $${RENDERDOC_VERSION}.0\" -c \"Set :CFBundleIdentifier org.renderdoc.qrenderdoc\" $${INFO_PLIST_PATH}
} else {
QT += x11extras
DEFINES += RENDERDOC_PLATFORM_POSIX RENDERDOC_PLATFORM_LINUX RENDERDOC_WINDOWING_XLIB RENDERDOC_WINDOWING_XCB
QMAKE_LFLAGS += '-Wl,--no-as-needed'
contains(QMAKE_CXXFLAGS, "-DRENDERDOC_SUPPORT_GL") {
# Link against GL
LIBS += -lGL
}
contains(QMAKE_CXXFLAGS, "-DRENDERDOC_SUPPORT_GLES") {
# Link against EGL
LIBS += -lEGL
}
}
}
# Add our sources first so Qt Creator adds new files here
SOURCES += Code/qrenderdoc.cpp \
Code/qprocessinfo.cpp \
Code/ReplayManager.cpp \
Code/CaptureContext.cpp \
Code/ScintillaSyntax.cpp \
Code/QRDUtils.cpp \
Code/FormatElement.cpp \
Code/Resources.cpp \
Code/pyrenderdoc/PythonContext.cpp \
Code/Interface/QRDInterface.cpp \
Code/Interface/CommonPipelineState.cpp \
Code/Interface/PersistantConfig.cpp \
Code/Interface/RemoteHost.cpp \
Windows/Dialogs/AboutDialog.cpp \
Windows/MainWindow.cpp \
Windows/EventBrowser.cpp \
Windows/TextureViewer.cpp \
Widgets/Extended/RDLineEdit.cpp \
Widgets/Extended/RDTextEdit.cpp \
Widgets/Extended/RDLabel.cpp \
Widgets/Extended/RDDoubleSpinBox.cpp \
Widgets/Extended/RDListView.cpp \
Widgets/CustomPaintWidget.cpp \
Widgets/ResourcePreview.cpp \
Widgets/ThumbnailStrip.cpp \
Widgets/TextureGoto.cpp \
Widgets/RangeHistogram.cpp \
Windows/Dialogs/TextureSaveDialog.cpp \
Windows/Dialogs/CaptureDialog.cpp \
Windows/Dialogs/LiveCapture.cpp \
Widgets/Extended/RDListWidget.cpp \
Windows/APIInspector.cpp \
Windows/PipelineState/PipelineStateViewer.cpp \
Windows/PipelineState/VulkanPipelineStateViewer.cpp \
Windows/PipelineState/D3D11PipelineStateViewer.cpp \
Windows/PipelineState/D3D12PipelineStateViewer.cpp \
Windows/PipelineState/GLPipelineStateViewer.cpp \
Widgets/Extended/RDTreeView.cpp \
Widgets/Extended/RDTreeWidget.cpp \
Windows/ConstantBufferPreviewer.cpp \
Widgets/BufferFormatSpecifier.cpp \
Windows/BufferViewer.cpp \
Widgets/Extended/RDTableView.cpp \
Windows/DebugMessageView.cpp \
Windows/StatisticsViewer.cpp \
Windows/Dialogs/SettingsDialog.cpp \
Windows/Dialogs/OrderedListEditor.cpp \
Widgets/Extended/RDTableWidget.cpp \
Windows/Dialogs/SuggestRemoteDialog.cpp \
Windows/Dialogs/VirtualFileDialog.cpp \
Windows/Dialogs/RemoteManager.cpp \
Windows/PixelHistoryView.cpp \
Widgets/PipelineFlowChart.cpp \
Windows/Dialogs/EnvironmentEditor.cpp \
Widgets/FindReplace.cpp \
Widgets/Extended/RDSplitter.cpp \
Windows/Dialogs/TipsDialog.cpp \
Windows/PythonShell.cpp
HEADERS += Code/CaptureContext.h \
Code/qprocessinfo.h \
Code/ReplayManager.h \
Code/ScintillaSyntax.h \
Code/QRDUtils.h \
Code/Resources.h \
Code/pyrenderdoc/PythonContext.h \
Code/pyrenderdoc/pyconversion.h \
Code/pyrenderdoc/document_check.h \
Code/Interface/QRDInterface.h \
Code/Interface/CommonPipelineState.h \
Code/Interface/PersistantConfig.h \
Code/Interface/RemoteHost.h \
Windows/Dialogs/AboutDialog.h \
Windows/MainWindow.h \
Windows/EventBrowser.h \
Windows/TextureViewer.h \
Widgets/Extended/RDLineEdit.h \
Widgets/Extended/RDTextEdit.h \
Widgets/Extended/RDLabel.h \
Widgets/Extended/RDDoubleSpinBox.h \
Widgets/Extended/RDListView.h \
Widgets/CustomPaintWidget.h \
Widgets/ResourcePreview.h \
Widgets/ThumbnailStrip.h \
Widgets/TextureGoto.h \
Widgets/RangeHistogram.h \
Windows/Dialogs/TextureSaveDialog.h \
Windows/Dialogs/CaptureDialog.h \
Windows/Dialogs/LiveCapture.h \
Widgets/Extended/RDListWidget.h \
Windows/APIInspector.h \
Windows/PipelineState/PipelineStateViewer.h \
Windows/PipelineState/VulkanPipelineStateViewer.h \
Windows/PipelineState/D3D11PipelineStateViewer.h \
Windows/PipelineState/D3D12PipelineStateViewer.h \
Windows/PipelineState/GLPipelineStateViewer.h \
Widgets/Extended/RDTreeView.h \
Widgets/Extended/RDTreeWidget.h \
Windows/ConstantBufferPreviewer.h \
Widgets/BufferFormatSpecifier.h \
Windows/BufferViewer.h \
Widgets/Extended/RDTableView.h \
Windows/DebugMessageView.h \
Windows/StatisticsViewer.h \
Windows/Dialogs/SettingsDialog.h \
Windows/Dialogs/OrderedListEditor.h \
Widgets/Extended/RDTableWidget.h \
Windows/Dialogs/SuggestRemoteDialog.h \
Windows/Dialogs/VirtualFileDialog.h \
Windows/Dialogs/RemoteManager.h \
Windows/PixelHistoryView.h \
Widgets/PipelineFlowChart.h \
Windows/Dialogs/EnvironmentEditor.h \
Widgets/FindReplace.h \
Widgets/Extended/RDSplitter.h \
Windows/Dialogs/TipsDialog.h \
Windows/PythonShell.h
FORMS += Windows/Dialogs/AboutDialog.ui \
Windows/MainWindow.ui \
Windows/EventBrowser.ui \
Windows/TextureViewer.ui \
Widgets/ResourcePreview.ui \
Widgets/ThumbnailStrip.ui \
Windows/Dialogs/TextureSaveDialog.ui \
Windows/Dialogs/CaptureDialog.ui \
Windows/Dialogs/LiveCapture.ui \
Windows/APIInspector.ui \
Windows/PipelineState/PipelineStateViewer.ui \
Windows/PipelineState/VulkanPipelineStateViewer.ui \
Windows/PipelineState/D3D11PipelineStateViewer.ui \
Windows/PipelineState/D3D12PipelineStateViewer.ui \
Windows/PipelineState/GLPipelineStateViewer.ui \
Windows/ConstantBufferPreviewer.ui \
Widgets/BufferFormatSpecifier.ui \
Windows/BufferViewer.ui \
Windows/ShaderViewer.ui \
Windows/DebugMessageView.ui \
Windows/StatisticsViewer.ui \
Windows/Dialogs/SettingsDialog.ui \
Windows/Dialogs/OrderedListEditor.ui \
Windows/Dialogs/SuggestRemoteDialog.ui \
Windows/Dialogs/VirtualFileDialog.ui \
Windows/Dialogs/RemoteManager.ui \
Windows/PixelHistoryView.ui \
Windows/Dialogs/EnvironmentEditor.ui \
Widgets/FindReplace.ui \
Windows/Dialogs/TipsDialog.ui \
Windows/PythonShell.ui
RESOURCES += Resources/resources.qrc
# Add ToolWindowManager
SOURCES += 3rdparty/toolwindowmanager/ToolWindowManager.cpp \
3rdparty/toolwindowmanager/ToolWindowManagerArea.cpp \
3rdparty/toolwindowmanager/ToolWindowManagerWrapper.cpp
HEADERS += 3rdparty/toolwindowmanager/ToolWindowManager.h \
3rdparty/toolwindowmanager/ToolWindowManagerArea.h \
3rdparty/toolwindowmanager/ToolWindowManagerWrapper.h
# Add FlowLayout
SOURCES += 3rdparty/flowlayout/FlowLayout.cpp
HEADERS += 3rdparty/flowlayout/FlowLayout.h
# Add Scintilla last as it has extra search paths
# Needed for building
DEFINES += SCINTILLA_QT=1 MAKING_LIBRARY=1 SCI_LEXER=1
INCLUDEPATH += $$_PRO_FILE_PWD_/3rdparty/scintilla/src
INCLUDEPATH += $$_PRO_FILE_PWD_/3rdparty/scintilla/lexlib
SOURCES += $$_PRO_FILE_PWD_/3rdparty/scintilla/lexlib/*.cxx \
$$_PRO_FILE_PWD_/3rdparty/scintilla/lexers/*.cxx \
$$_PRO_FILE_PWD_/3rdparty/scintilla/src/*.cxx \
$$_PRO_FILE_PWD_/3rdparty/scintilla/qt/ScintillaEdit/*.cpp \
$$_PRO_FILE_PWD_/3rdparty/scintilla/qt/ScintillaEditBase/*.cpp \
Windows/ShaderViewer.cpp
HEADERS += $$_PRO_FILE_PWD_/3rdparty/scintilla/lexlib/*.h \
$$_PRO_FILE_PWD_/3rdparty/scintilla/src/*.h \
$$_PRO_FILE_PWD_/3rdparty/scintilla/qt/ScintillaEdit/*.h \
$$_PRO_FILE_PWD_/3rdparty/scintilla/qt/ScintillaEditBase/*.h \
Windows/ShaderViewer.h