cutter/src/Cutter.pro

291 lines
8.0 KiB
Prolog
Raw Normal View History

TEMPLATE = app
TARGET = Cutter
# The application version
2018-01-30 21:49:43 +00:00
VERSION = 1.2
2017-11-05 14:19:47 +00:00
ICON = img/cutter.icns
2018-03-02 20:00:16 +00:00
QT += core gui widgets svg
QT_CONFIG -= no-pkg-config
2017-10-08 06:23:22 +00:00
CONFIG += c++11
2018-03-02 20:00:16 +00:00
# You can spawn qmake with qmake "CONFIG+=CUTTER_ENABLE_JUPYTER" to set a variable
# Or manually edit this file
#CONFIG += CUTTER_ENABLE_JUPYTER
#CONFIG += CUTTER_ENABLE_QTWEBENGINE
# Define the preprocessor macro to get the application version in our application.
DEFINES += APP_VERSION=\\\"$$VERSION\\\"
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
}
macx {
QMAKE_CXXFLAGS = -mmacosx-version-min=10.7 -std=gnu0x -stdlib=libc++
QMAKE_INFO_PLIST = apple/Info.plist
}
unix:exists(/usr/local/include/libr) {
INCLUDEPATH += /usr/local/include/libr
}
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
}
2018-03-02 20:42:27 +00:00
unix:CUTTER_ENABLE_JUPYTER|macx: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
SOURCES += \
2018-03-04 17:42:02 +00:00
Main.cpp \
Cutter.cpp \
widgets/DisassemblerGraphView.cpp \
utils/RichTextPainter.cpp \
2017-10-01 19:09:42 +00:00
dialogs/OptionsDialog.cpp \
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 \
utils/Helpers.cpp \
utils/HexAsciiHighlighter.cpp \
utils/HexHighlighter.cpp \
utils/Highlighter.cpp \
2017-10-02 09:41:28 +00:00
utils/MdHighlighter.cpp \
dialogs/preferences/AsmOptionsWidget.cpp \
dialogs/NewFileDialog.cpp \
AnalThread.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/PieView.cpp \
widgets/RelocsWidget.cpp \
widgets/SdbDock.cpp \
widgets/SectionsDock.cpp \
widgets/SectionsWidget.cpp \
widgets/Sidebar.cpp \
widgets/StringsWidget.cpp \
widgets/SymbolsWidget.cpp \
menus/DisassemblyContextMenu.cpp \
widgets/DisassemblyWidget.cpp \
widgets/SidebarWidget.cpp \
widgets/HexdumpWidget.cpp \
2017-10-15 07:14:05 +00:00
utils/Configuration.cpp \
utils/Colors.cpp \
dialogs/SaveProjectDialog.cpp \
2017-12-03 16:26:01 +00:00
utils/TempConfig.cpp \
utils/SvgIconEngine.cpp \
utils/SyntaxHighlighter.cpp \
widgets/PseudocodeWidget.cpp \
widgets/VisualNavbar.cpp \
widgets/GraphView.cpp \
dialogs/preferences/PreferencesDialog.cpp \
dialogs/preferences/GeneralOptionsWidget.cpp \
dialogs/preferences/GraphOptionsWidget.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 \
widgets/SearchWidget.cpp \
2017-12-13 17:36:00 +00:00
CutterApplication.cpp \
utils/JupyterConnection.cpp \
2018-02-11 17:59:23 +00:00
widgets/JupyterWidget.cpp \
2018-02-22 21:08:06 +00:00
utils/PythonAPI.cpp \
utils/NestedIPyKernel.cpp \
dialogs/R2PluginsDialog.cpp
HEADERS += \
2018-03-04 17:42:02 +00:00
Cutter.h \
widgets/DisassemblerGraphView.h \
utils/RichTextPainter.h \
utils/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 \
utils/Helpers.h \
utils/HexAsciiHighlighter.h \
utils/HexHighlighter.h \
MainWindow.h \
utils/Highlighter.h \
utils/MdHighlighter.h \
2017-10-02 09:41:28 +00:00
dialogs/OptionsDialog.h \
dialogs/NewFileDialog.h \
AnalThread.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/PieView.h \
widgets/RelocsWidget.h \
widgets/SdbDock.h \
widgets/SectionsDock.h \
widgets/SectionsWidget.h \
widgets/Sidebar.h \
widgets/StringsWidget.h \
widgets/SymbolsWidget.h \
menus/DisassemblyContextMenu.h \
widgets/DisassemblyWidget.h \
widgets/SidebarWidget.h \
widgets/HexdumpWidget.h \
2017-10-15 07:14:05 +00:00
utils/Configuration.h \
utils/Colors.h \
dialogs/SaveProjectDialog.h \
2017-12-03 16:26:01 +00:00
utils/TempConfig.h \
utils/SvgIconEngine.h \
utils/SyntaxHighlighter.h \
widgets/PseudocodeWidget.h \
widgets/VisualNavbar.h \
widgets/GraphView.h \
dialogs/preferences/PreferencesDialog.h \
dialogs/preferences/GeneralOptionsWidget.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 \
widgets/SearchWidget.h \
2017-12-13 17:36:00 +00:00
utils/JupyterConnection.h \
2018-02-11 17:59:23 +00:00
widgets/JupyterWidget.h \
2018-02-22 21:08:06 +00:00
utils/PythonAPI.h \
utils/NestedIPyKernel.h \
dialogs/R2PluginsDialog.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/OptionsDialog.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/SectionsDock.ui \
widgets/Sidebar.ui \
widgets/StringsWidget.ui \
widgets/SymbolsWidget.ui \
widgets/SidebarWidget.ui \
widgets/HexdumpWidget.ui \
dialogs/SaveProjectDialog.ui \
dialogs/preferences/PreferencesDialog.ui \
dialogs/preferences/GeneralOptionsWidget.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 \
widgets/SearchWidget.ui \
widgets/JupyterWidget.ui \
dialogs/R2PluginsDialog.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
2018-03-04 17:42:02 +00:00
desktop_file = Cutter.desktop
# built-in no need for files atm
target.path = $$PREFIX/bin
share_applications.path = $$PREFIX/share/applications
share_applications.files = $$desktop_file
INSTALLS += target 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
}
}