Sync translations from Transifex and run lupdate
[qBittorrent.git] / src / src.pro
blob8f6173e6c00c90261a4cbdb2f7babddbdfcef585
1 # Global
2 TEMPLATE = app
3 CONFIG += qt thread silent
5 # Platform specific configuration
6 win32: include(../winconf.pri)
7 macx: include(../macxconf.pri)
8 unix:!macx: include(../unixconf.pri)
10 QT += core-private network sql xml
12 macx|*-clang*: QMAKE_CXXFLAGS_WARN_ON += -Wno-range-loop-analysis
14 nogui {
15 TARGET = qbittorrent-nox
16 QT -= gui
17 DEFINES += DISABLE_GUI
18 } else {
19 TARGET = qbittorrent
20 QT += xml svg widgets
22 CONFIG(static) {
23 DEFINES += QBT_STATIC_QT
24 QTPLUGIN += qico
26 win32: lessThan(QT_MAJOR_VERSION, 6) {
27 QT += winextras
29 macx {
30 LIBS += -lobjc
34 nowebui {
35 DEFINES += DISABLE_WEBUI
38 stacktrace {
39 DEFINES += STACKTRACE
41 macx {
42 DEFINES += BOOST_STACKTRACE_GNU_SOURCE_NOT_REQUIRED
43 QMAKE_LFLAGS += -rdynamic
45 unix {
46 LIBS += -ldl
47 QMAKE_LFLAGS += -rdynamic
51 CONFIG(debug, debug|release): message(Project is built in DEBUG mode.)
52 CONFIG(release, debug|release): message(Project is built in RELEASE mode.)
54 # Disable debug output in release mode
55 CONFIG(release, debug|release) {
56 message(Disabling debug output.)
57 DEFINES += QT_NO_DEBUG_OUTPUT
60 # VERSION DEFINES
61 include(../version.pri)
63 # Qt defines
64 DEFINES += \
65 QT_DISABLE_DEPRECATED_BEFORE=0x050f02 \
66 QT_NO_CAST_FROM_ASCII \
67 QT_NO_CAST_TO_ASCII \
68 QT_NO_CAST_FROM_BYTEARRAY \
69 QT_NO_NARROWING_CONVERSIONS_IN_CONNECT \
70 QT_USE_QSTRINGBUILDER \
71 QT_STRICT_ITERATORS
73 INCLUDEPATH += $$PWD
75 include(app/app.pri)
76 include(base/base.pri)
77 !nogui: include(gui/gui.pri)
78 !nowebui: include(webui/webui.pri)
80 isEmpty(QMAKE_LRELEASE) {
81 win32: QMAKE_LRELEASE = $$[QT_HOST_BINS]/lrelease.exe
82 else: QMAKE_LRELEASE = $$[QT_HOST_BINS]/lrelease
83 unix {
84 equals(QT_MAJOR_VERSION, 5) {
85 !exists($$QMAKE_LRELEASE): QMAKE_LRELEASE = lrelease-qt5
88 else {
89 !exists($$QMAKE_LRELEASE): QMAKE_LRELEASE = lrelease
92 lrelease.input = TS_SOURCES
93 lrelease.output = ${QMAKE_FILE_PATH}/${QMAKE_FILE_BASE}.qm
94 lrelease.commands = @echo "lrelease ${QMAKE_FILE_NAME}" && $$QMAKE_LRELEASE -silent ${QMAKE_FILE_NAME} -qm ${QMAKE_FILE_OUT}
95 lrelease.CONFIG += no_link target_predeps
96 QMAKE_EXTRA_COMPILERS += lrelease
98 TRANSLATIONS = $$files($$PWD/lang/qbittorrent_*.ts)
99 TS_SOURCES += $$TRANSLATIONS
101 # Resource files
102 QMAKE_RESOURCE_FLAGS += -compress 9 -threshold 5
103 RESOURCES += \
104 icons/icons.qrc \
105 lang/lang.qrc \
106 searchengine/searchengine.qrc
108 DESTDIR = .