cutter/src/Cutter.pro

445 lines
13 KiB
Prolog
Raw Normal View History

TEMPLATE = app
TARGET = Cutter
CUTTER_VERSION_MAJOR = 1
CUTTER_VERSION_MINOR = 7
2019-01-21 21:22:39 +00:00
CUTTER_VERSION_PATCH = 4
VERSION = $${CUTTER_VERSION_MAJOR}.$${CUTTER_VERSION_MINOR}.$${CUTTER_VERSION_PATCH}
# Required QT version
lessThan(QT_MAJOR_VERSION, 5): error("requires Qt 5")
TRANSLATIONS += translations/cutter_ca.ts \
translations/cutter_de.ts \
2019-01-19 21:16:50 +00:00
translations/cutter_es.ts \
2018-10-31 16:07:53 +00:00
translations/cutter_fr.ts \
translations/cutter_it.ts \
translations/cutter_nl.ts \
2019-01-19 21:16:50 +00:00
translations/cutter_pt.ts \
translations/cutter_ro.ts \
translations/cutter_ru.ts \
translations/cutter_tr.ts
2018-10-31 16:07:53 +00:00
# Icon for OS X
2017-11-05 14:19:47 +00:00
ICON = img/cutter.icns
# Icon/resources for Windows
2018-09-06 07:26:19 +00:00
win32: RC_ICONS = img/cutter.ico
QT += core gui widgets svg network
QT_CONFIG -= no-pkg-config
2017-10-08 06:23:22 +00:00
CONFIG += c++11
!defined(CUTTER_ENABLE_JUPYTER, var) CUTTER_ENABLE_JUPYTER=true
equals(CUTTER_ENABLE_JUPYTER, true) CONFIG += CUTTER_ENABLE_JUPYTER
!defined(CUTTER_ENABLE_QTWEBENGINE, var) CUTTER_ENABLE_QTWEBENGINE=false
2018-03-20 20:44:00 +00:00
equals(CUTTER_ENABLE_JUPYTER, true) {
equals(CUTTER_ENABLE_QTWEBENGINE, true) CONFIG += CUTTER_ENABLE_QTWEBENGINE
}
2018-03-02 20:00:16 +00:00
!defined(CUTTER_BUNDLE_R2_APPBUNDLE, var) CUTTER_BUNDLE_R2_APPBUNDLE=false
equals(CUTTER_BUNDLE_R2_APPBUNDLE, true) CONFIG += CUTTER_BUNDLE_R2_APPBUNDLE
!defined(CUTTER_APPVEYOR_R2DEC, var) CUTTER_APPVEYOR_R2DEC=false
equals(CUTTER_APPVEYOR_R2DEC, true) CONFIG += CUTTER_APPVEYOR_R2DEC
2018-03-05 20:39:36 +00:00
CUTTER_ENABLE_JUPYTER {
2018-03-02 20:00:16 +00:00
message("Jupyter support enabled.")
DEFINES += CUTTER_ENABLE_JUPYTER
2018-03-06 16:50:09 +00:00
} else {
message("Jupyter support disabled.")
2018-03-02 20:00:16 +00:00
}
2018-03-02 20:00:16 +00:00
CUTTER_ENABLE_QTWEBENGINE {
message("QtWebEngine support enabled.")
DEFINES += CUTTER_ENABLE_QTWEBENGINE
QT += webenginewidgets
2018-03-06 16:50:09 +00:00
} else {
message("QtWebEngine support disabled.")
2018-03-02 20:00:16 +00:00
}
2018-03-02 13:15:53 +00:00
2017-10-08 06:23:22 +00:00
INCLUDEPATH *= .
win32 {
# Generate debug symbols in release mode
QMAKE_CXXFLAGS_RELEASE += -Zi # Compiler
QMAKE_LFLAGS_RELEASE += /DEBUG # Linker
# Multithreaded compilation
QMAKE_CXXFLAGS += -MP
2017-10-08 06:23:22 +00:00
}
macx {
QMAKE_CXXFLAGS = -mmacosx-version-min=10.7 -std=gnu0x -stdlib=libc++
QMAKE_TARGET_BUNDLE_PREFIX = org.radare
QMAKE_BUNDLE = cutter
QMAKE_INFO_PLIST = macos/Info.plist
}
unix:exists(/usr/local/include/libr)|bsd:exists(/usr/local/include/libr) {
INCLUDEPATH += /usr/local/include/libr
}
unix {
QMAKE_LFLAGS += -rdynamic # Export dynamic symbols for plugins
}
2018-02-11 17:59:23 +00:00
# Libraries
include(lib_radare2.pri)
2018-03-02 20:42:27 +00:00
win32:CUTTER_ENABLE_JUPYTER {
2018-02-25 19:17:03 +00:00
pythonpath = $$quote($$system("where python"))
pythonpath = $$replace(pythonpath, ".exe ", ".exe;")
pythonpath = $$section(pythonpath, ";", 0, 0)
pythonpath = $$clean_path($$dirname(pythonpath))
LIBS += -L$${pythonpath} -L$${pythonpath}/libs -lpython3
INCLUDEPATH += $${pythonpath}/include
}
unix:CUTTER_ENABLE_JUPYTER|macx:CUTTER_ENABLE_JUPYTER|bsd:CUTTER_ENABLE_JUPYTER {
2018-03-05 20:39:36 +00:00
defined(PYTHON_FRAMEWORK_DIR, var) {
message("Using Python.framework at $$PYTHON_FRAMEWORK_DIR")
INCLUDEPATH += $$PYTHON_FRAMEWORK_DIR/Python.framework/Headers
LIBS += -F$$PYTHON_FRAMEWORK_DIR -framework Python
DEFINES += MACOS_PYTHON_FRAMEWORK_BUNDLED
} else {
CONFIG += link_pkgconfig
!packagesExist(python3) {
error("ERROR: Python 3 could not be found. Make sure it is available to pkg-config.")
}
PKGCONFIG += python3
2018-02-25 19:17:03 +00:00
}
}
2018-02-11 17:59:23 +00:00
macx:CUTTER_BUNDLE_R2_APPBUNDLE {
message("Using r2 rom AppBundle")
DEFINES += MACOS_R2_BUNDLED
}
CUTTER_APPVEYOR_R2DEC {
message("Appveyor r2dec")
DEFINES += CUTTER_APPVEYOR_R2DEC
}
QMAKE_SUBSTITUTES += CutterConfig.h.in
SOURCES += \
2018-03-04 17:42:02 +00:00
Main.cpp \
Cutter.cpp \
widgets/DisassemblerGraphView.cpp \
widgets/OverviewView.cpp \
2018-10-17 07:55:53 +00:00
common/RichTextPainter.cpp \
dialogs/InitialOptionsDialog.cpp \
2017-10-01 19:09:42 +00:00
dialogs/AboutDialog.cpp \
dialogs/CommentsDialog.cpp \
dialogs/EditInstructionDialog.cpp \
2017-10-01 19:09:42 +00:00
dialogs/FlagDialog.cpp \
dialogs/RenameDialog.cpp \
dialogs/XrefsDialog.cpp \
MainWindow.cpp \
2018-10-17 07:55:53 +00:00
common/Helpers.cpp \
common/HexAsciiHighlighter.cpp \
common/HexHighlighter.cpp \
common/Highlighter.cpp \
common/MdHighlighter.cpp \
dialogs/preferences/AsmOptionsWidget.cpp \
dialogs/NewFileDialog.cpp \
2018-05-26 18:09:20 +00:00
AnalTask.cpp \
widgets/CommentsWidget.cpp \
widgets/ConsoleWidget.cpp \
widgets/Dashboard.cpp \
widgets/EntrypointWidget.cpp \
widgets/ExportsWidget.cpp \
widgets/FlagsWidget.cpp \
widgets/FunctionsWidget.cpp \
widgets/ImportsWidget.cpp \
widgets/Omnibar.cpp \
widgets/RelocsWidget.cpp \
widgets/SdbDock.cpp \
widgets/SectionsWidget.cpp \
widgets/SegmentsWidget.cpp \
widgets/StringsWidget.cpp \
widgets/SymbolsWidget.cpp \
menus/DisassemblyContextMenu.cpp \
widgets/DisassemblyWidget.cpp \
widgets/HexdumpWidget.cpp \
2018-10-17 07:55:53 +00:00
common/Configuration.cpp \
common/Colors.cpp \
dialogs/SaveProjectDialog.cpp \
2018-10-17 07:55:53 +00:00
common/TempConfig.cpp \
common/SvgIconEngine.cpp \
common/SyntaxHighlighter.cpp \
widgets/PseudocodeWidget.cpp \
widgets/VisualNavbar.cpp \
widgets/GraphView.cpp \
dialogs/preferences/PreferencesDialog.cpp \
dialogs/preferences/AppearanceOptionsWidget.cpp \
dialogs/preferences/GraphOptionsWidget.cpp \
dialogs/preferences/PreferenceCategory.cpp \
2017-12-23 16:42:42 +00:00
widgets/QuickFilterView.cpp \
2018-02-04 14:32:18 +00:00
widgets/ClassesWidget.cpp \
widgets/ResourcesWidget.cpp \
2018-02-26 22:26:18 +00:00
widgets/VTablesWidget.cpp \
2018-03-06 17:21:48 +00:00
widgets/TypesWidget.cpp \
2018-05-21 17:34:41 +00:00
widgets/HeadersWidget.cpp \
widgets/SearchWidget.cpp \
2017-12-13 17:36:00 +00:00
CutterApplication.cpp \
2018-10-17 07:55:53 +00:00
common/JupyterConnection.cpp \
2018-02-11 17:59:23 +00:00
widgets/JupyterWidget.cpp \
2018-10-17 07:55:53 +00:00
common/PythonAPI.cpp \
common/NestedIPyKernel.cpp \
dialogs/R2PluginsDialog.cpp \
widgets/CutterDockWidget.cpp \
widgets/CutterTreeWidget.cpp \
widgets/GraphWidget.cpp \
widgets/OverviewWidget.cpp \
2018-10-17 07:55:53 +00:00
common/JsonTreeItem.cpp \
common/JsonModel.cpp \
2018-05-24 15:37:37 +00:00
dialogs/VersionInfoDialog.cpp \
2018-05-26 16:21:23 +00:00
widgets/ZignaturesWidget.cpp \
2018-10-17 07:55:53 +00:00
common/AsyncTask.cpp \
dialogs/AsyncTaskDialog.cpp \
widgets/StackWidget.cpp \
widgets/RegistersWidget.cpp \
2018-06-20 09:24:28 +00:00
widgets/BacktraceWidget.cpp \
2018-05-28 20:06:24 +00:00
dialogs/OpenFileDialog.cpp \
2018-10-17 07:55:53 +00:00
common/CommandTask.cpp \
common/ProgressIndicator.cpp \
common/R2Task.cpp \
2018-12-21 20:36:40 +00:00
widgets/DebugActions.cpp \
widgets/MemoryMapWidget.cpp \
dialogs/preferences/DebugOptionsWidget.cpp \
widgets/BreakpointWidget.cpp \
dialogs/BreakpointsDialog.cpp \
2018-07-19 14:35:46 +00:00
dialogs/AttachProcDialog.cpp \
2018-08-04 18:05:56 +00:00
widgets/RegisterRefsWidget.cpp \
dialogs/SetToDataDialog.cpp \
dialogs/EditVariablesDialog.cpp \
widgets/ColorSchemePrefWidget.cpp \
common/ColorSchemeFileSaver.cpp \
dialogs/EditFunctionDialog.cpp \
widgets/CutterTreeView.cpp \
widgets/ComboQuickFilterView.cpp \
2018-09-30 18:30:25 +00:00
dialogs/HexdumpRangeDialog.cpp \
common/QtResImporter.cpp \
common/CutterSeekable.cpp \
2019-01-19 20:54:02 +00:00
common/RefreshDeferrer.cpp \
dialogs/WelcomeDialog.cpp
HEADERS += \
2018-03-04 17:42:02 +00:00
Cutter.h \
widgets/DisassemblerGraphView.h \
widgets/OverviewView.h \
2018-10-17 07:55:53 +00:00
common/RichTextPainter.h \
common/CachedFontMetrics.h \
2017-10-01 19:09:42 +00:00
dialogs/AboutDialog.h \
dialogs/preferences/AsmOptionsWidget.h \
2017-10-01 19:09:42 +00:00
dialogs/CommentsDialog.h \
dialogs/EditInstructionDialog.h \
2017-10-01 19:09:42 +00:00
dialogs/FlagDialog.h \
dialogs/RenameDialog.h \
dialogs/XrefsDialog.h \
2018-10-17 07:55:53 +00:00
common/Helpers.h \
common/HexAsciiHighlighter.h \
common/HexHighlighter.h \
2017-10-01 19:09:42 +00:00
MainWindow.h \
2018-10-17 07:55:53 +00:00
common/Highlighter.h \
common/MdHighlighter.h \
dialogs/InitialOptionsDialog.h \
dialogs/NewFileDialog.h \
2018-05-26 18:09:20 +00:00
AnalTask.h \
widgets/CommentsWidget.h \
widgets/ConsoleWidget.h \
widgets/Dashboard.h \
widgets/EntrypointWidget.h \
widgets/ExportsWidget.h \
widgets/FlagsWidget.h \
widgets/FunctionsWidget.h \
widgets/ImportsWidget.h \
widgets/Omnibar.h \
widgets/RelocsWidget.h \
widgets/SdbDock.h \
widgets/SectionsWidget.h \
widgets/SegmentsWidget.h \
widgets/StringsWidget.h \
widgets/SymbolsWidget.h \
menus/DisassemblyContextMenu.h \
widgets/DisassemblyWidget.h \
widgets/HexdumpWidget.h \
2018-10-17 07:55:53 +00:00
common/Configuration.h \
common/Colors.h \
dialogs/SaveProjectDialog.h \
2018-10-17 07:55:53 +00:00
common/TempConfig.h \
common/SvgIconEngine.h \
common/SyntaxHighlighter.h \
widgets/PseudocodeWidget.h \
widgets/VisualNavbar.h \
widgets/GraphView.h \
dialogs/preferences/PreferencesDialog.h \
dialogs/preferences/AppearanceOptionsWidget.h \
dialogs/preferences/PreferenceCategory.h \
dialogs/preferences/GraphOptionsWidget.h \
2017-12-23 16:42:42 +00:00
widgets/QuickFilterView.h \
2018-02-04 14:32:18 +00:00
widgets/ClassesWidget.h \
widgets/ResourcesWidget.h \
2018-02-26 22:26:18 +00:00
CutterApplication.h \
2017-12-13 17:36:00 +00:00
widgets/VTablesWidget.h \
2018-03-06 17:21:48 +00:00
widgets/TypesWidget.h \
2018-05-21 17:34:41 +00:00
widgets/HeadersWidget.h \
widgets/SearchWidget.h \
2018-10-17 07:55:53 +00:00
common/JupyterConnection.h \
2018-02-11 17:59:23 +00:00
widgets/JupyterWidget.h \
2018-10-17 07:55:53 +00:00
common/PythonAPI.h \
common/NestedIPyKernel.h \
dialogs/R2PluginsDialog.h \
widgets/CutterDockWidget.h \
widgets/CutterTreeWidget.h \
widgets/GraphWidget.h \
widgets/OverviewWidget.h \
2018-10-17 07:55:53 +00:00
common/JsonTreeItem.h \
common/JsonModel.h \
2018-05-24 15:37:37 +00:00
dialogs/VersionInfoDialog.h \
2018-05-26 16:21:23 +00:00
widgets/ZignaturesWidget.h \
2018-10-17 07:55:53 +00:00
common/AsyncTask.h \
dialogs/AsyncTaskDialog.h \
widgets/StackWidget.h \
widgets/RegistersWidget.h \
2018-06-20 09:24:28 +00:00
widgets/BacktraceWidget.h \
2018-05-28 20:06:24 +00:00
dialogs/OpenFileDialog.h \
2018-10-17 07:55:53 +00:00
common/StringsTask.h \
common/FunctionsTask.h \
common/CommandTask.h \
common/ProgressIndicator.h \
2018-07-22 13:04:13 +00:00
plugins/CutterPlugin.h \
2018-10-17 07:55:53 +00:00
common/R2Task.h \
2018-12-21 20:36:40 +00:00
widgets/DebugActions.h \
widgets/MemoryMapWidget.h \
dialogs/preferences/DebugOptionsWidget.h \
widgets/BreakpointWidget.h \
dialogs/BreakpointsDialog.h \
2018-07-19 14:35:46 +00:00
dialogs/AttachProcDialog.h \
2018-08-04 18:05:56 +00:00
widgets/RegisterRefsWidget.h \
dialogs/SetToDataDialog.h \
2018-10-17 07:55:53 +00:00
common/InitialOptions.h \
dialogs/EditVariablesDialog.h \
2018-10-17 07:55:53 +00:00
common/ColorSchemeFileSaver.h \
widgets/ColorSchemePrefWidget.h \
dialogs/EditFunctionDialog.h \
widgets/CutterTreeView.h \
widgets/ComboQuickFilterView.h \
2018-09-30 18:30:25 +00:00
dialogs/HexdumpRangeDialog.h \
common/QtResImporter.h \
common/CutterSeekable.h \
2019-01-19 20:54:02 +00:00
common/RefreshDeferrer.h \
dialogs/WelcomeDialog.h
FORMS += \
2017-10-01 19:09:42 +00:00
dialogs/AboutDialog.ui \
dialogs/preferences/AsmOptionsWidget.ui \
2017-10-01 19:09:42 +00:00
dialogs/CommentsDialog.ui \
dialogs/EditInstructionDialog.ui \
2017-10-01 19:09:42 +00:00
dialogs/FlagDialog.ui \
dialogs/RenameDialog.ui \
dialogs/XrefsDialog.ui \
dialogs/NewfileDialog.ui \
dialogs/InitialOptionsDialog.ui \
dialogs/EditFunctionDialog.ui \
2017-10-02 09:41:28 +00:00
MainWindow.ui \
widgets/CommentsWidget.ui \
widgets/ConsoleWidget.ui \
widgets/Dashboard.ui \
widgets/EntrypointWidget.ui \
widgets/FlagsWidget.ui \
widgets/ExportsWidget.ui \
widgets/FunctionsWidget.ui \
widgets/ImportsWidget.ui \
widgets/SdbDock.ui \
widgets/RelocsWidget.ui \
widgets/StringsWidget.ui \
widgets/SymbolsWidget.ui \
widgets/HexdumpWidget.ui \
dialogs/SaveProjectDialog.ui \
dialogs/preferences/PreferencesDialog.ui \
dialogs/preferences/AppearanceOptionsWidget.ui \
dialogs/preferences/GraphOptionsWidget.ui \
2017-12-21 15:00:18 +00:00
widgets/QuickFilterView.ui \
2017-12-23 16:42:42 +00:00
widgets/PseudocodeWidget.ui \
2018-02-26 22:26:18 +00:00
widgets/ClassesWidget.ui \
2017-12-13 17:36:00 +00:00
widgets/VTablesWidget.ui \
2018-03-06 17:21:48 +00:00
widgets/TypesWidget.ui \
2018-05-21 17:34:41 +00:00
widgets/HeadersWidget.ui \
widgets/SearchWidget.ui \
widgets/JupyterWidget.ui \
dialogs/R2PluginsDialog.ui \
2018-05-24 15:37:37 +00:00
dialogs/VersionInfoDialog.ui \
2018-05-26 18:49:57 +00:00
widgets/ZignaturesWidget.ui \
dialogs/AsyncTaskDialog.ui \
widgets/StackWidget.ui \
widgets/RegistersWidget.ui \
2018-06-20 09:24:28 +00:00
widgets/BacktraceWidget.ui \
2018-06-12 08:43:14 +00:00
dialogs/OpenFileDialog.ui \
widgets/MemoryMapWidget.ui \
dialogs/preferences/DebugOptionsWidget.ui \
widgets/BreakpointWidget.ui \
dialogs/BreakpointsDialog.ui \
2018-07-19 14:35:46 +00:00
dialogs/AttachProcDialog.ui \
2018-08-04 18:05:56 +00:00
widgets/RegisterRefsWidget.ui \
dialogs/SetToDataDialog.ui \
dialogs/EditVariablesDialog.ui \
widgets/ColorSchemePrefWidget.ui \
widgets/CutterTreeView.ui \
widgets/ComboQuickFilterView.ui \
2019-01-19 20:54:02 +00:00
dialogs/HexdumpRangeDialog.ui \
dialogs/WelcomeDialog.ui
RESOURCES += \
2018-01-09 11:03:07 +00:00
resources.qrc \
themes/qdarkstyle/style.qrc
2018-03-04 17:42:02 +00:00
DISTFILES += Cutter.astylerc
# 'make install' for AppImage
unix {
isEmpty(PREFIX) {
PREFIX = /usr/local
2017-03-30 03:07:34 +00:00
}
icon_file = img/cutter.svg
share_pixmaps.path = $$PREFIX/share/pixmaps
share_pixmaps.files = $$icon_file
desktop_file = org.radare.Cutter.desktop
share_applications.path = $$PREFIX/share/applications
share_applications.files = $$desktop_file
appstream_file = org.radare.Cutter.appdata.xml
2018-06-12 13:03:01 +00:00
# Used by ???
2018-06-12 13:03:01 +00:00
share_appdata.path = $$PREFIX/share/appdata
share_appdata.files = $$appstream_file
# Used by AppImageHub (See https://www.freedesktop.org/software/appstream)
share_appdata.path = $$PREFIX/share/metainfo
share_appdata.files = $$appstream_file
2018-06-12 13:03:01 +00:00
# built-in no need for files atm
target.path = $$PREFIX/bin
INSTALLS += target share_appdata share_metadata share_applications share_pixmaps
# Triggered for example by 'qmake APPIMAGE=1'
!isEmpty(APPIMAGE){
appimage_root.path = /
appimage_root.files = $$icon_file $$desktop_file
INSTALLS += appimage_root
DEFINES += APPIMAGE
}
}