2012-02-23 19:18:08 +01:00
|
|
|
DESTDIR = $$PWD/../bin
|
|
|
|
OBJECTS_DIR = $$PWD/../build
|
|
|
|
MOC_DIR = $$PWD/../build
|
|
|
|
RCC_DIR = $$PWD/../build
|
|
|
|
UI_DIR = $$PWD/../build
|
2013-04-16 23:02:36 +02:00
|
|
|
|
|
|
|
# workaround for #849: see https://bugreports.qt-project.org/browse/QTBUG-23196
|
|
|
|
mocinclude.CONFIG *= fix_target
|
|
|
|
|
2014-01-26 19:12:34 +01:00
|
|
|
unix: VERSION = 1.7.0
|
2012-02-18 14:47:38 +01:00
|
|
|
|
|
|
|
# Please read BUILD information #
|
2012-03-23 17:29:12 +01:00
|
|
|
#DEFINES *= PORTABLE_BUILD
|
2014-02-02 16:21:06 +01:00
|
|
|
|
2012-08-11 00:29:08 +02:00
|
|
|
win32-msvc* {
|
2012-03-23 17:29:12 +01:00
|
|
|
DEFINES *= W7API
|
2012-02-18 14:47:38 +01:00
|
|
|
LIBS += User32.lib Ole32.lib Shell32.lib ShlWapi.lib Gdi32.lib ComCtl32.lib
|
|
|
|
}
|
|
|
|
|
2014-02-04 23:04:06 +01:00
|
|
|
# QtDBus not available on Mac
|
|
|
|
mac: DEFINES *= DISABLE_DBUS
|
|
|
|
|
2013-01-31 20:27:37 +01:00
|
|
|
# Check for pkg-config availability
|
2013-03-14 15:29:12 +01:00
|
|
|
!mac:unix:system(pkg-config --version > /dev/null) {
|
2013-02-24 23:19:37 +01:00
|
|
|
isEqual(QT_MAJOR_VERSION, 5) {
|
2013-02-25 14:51:52 +01:00
|
|
|
MODNAME = Qt5WebKitWidgets
|
2013-02-24 23:19:37 +01:00
|
|
|
}
|
|
|
|
else {
|
2013-02-25 14:51:52 +01:00
|
|
|
MODNAME = QtWebKit
|
2013-02-24 23:19:37 +01:00
|
|
|
}
|
|
|
|
|
2013-02-25 14:51:52 +01:00
|
|
|
QTWEBKIT_VERSION = $$system(PKG_CONFIG_PATH="$$[QT_INSTALL_LIBS]/pkgconfig" pkg-config --modversion $$MODNAME)
|
2013-01-31 20:27:37 +01:00
|
|
|
QTWEBKIT_VERSION_MAJOR = $$section(QTWEBKIT_VERSION, ".", 0, 0)
|
|
|
|
QTWEBKIT_VERSION_MINOR = $$section(QTWEBKIT_VERSION, ".", 1, 1)
|
|
|
|
|
2013-02-24 23:19:37 +01:00
|
|
|
isEqual(QT_MAJOR_VERSION, 5) {
|
|
|
|
greaterThan(QTWEBKIT_VERSION_MAJOR, 4) {
|
|
|
|
DEFINES *= USE_QTWEBKIT_2_2 USE_QTWEBKIT_2_3
|
|
|
|
}
|
2013-01-31 20:27:37 +01:00
|
|
|
}
|
2013-02-24 23:19:37 +01:00
|
|
|
else { # Qt 4
|
|
|
|
greaterThan(QTWEBKIT_VERSION_MAJOR, 3):greaterThan(QTWEBKIT_VERSION_MINOR, 8) {
|
|
|
|
DEFINES *= USE_QTWEBKIT_2_2
|
|
|
|
}
|
2013-02-02 13:54:26 +01:00
|
|
|
|
2013-02-24 23:19:37 +01:00
|
|
|
greaterThan(QTWEBKIT_VERSION_MAJOR, 3):greaterThan(QTWEBKIT_VERSION_MINOR, 9) {
|
|
|
|
DEFINES *= USE_QTWEBKIT_2_3
|
|
|
|
}
|
2013-02-02 13:54:26 +01:00
|
|
|
}
|
2013-01-31 20:27:37 +01:00
|
|
|
}
|
|
|
|
else {
|
|
|
|
isEqual(QT_VERSION, 4.8.0)|greaterThan(QT_VERSION, 4.8.0) {
|
|
|
|
DEFINES *= USE_QTWEBKIT_2_2
|
|
|
|
}
|
2013-02-24 23:19:37 +01:00
|
|
|
|
|
|
|
isEqual(QT_MAJOR_VERSION, 5) {
|
|
|
|
DEFINES *= USE_QTWEBKIT_2_2 USE_QTWEBKIT_2_3
|
|
|
|
}
|
2013-01-19 19:37:40 +01:00
|
|
|
}
|
|
|
|
|
2012-04-05 11:44:01 +02:00
|
|
|
DEFINES *= QT_NO_URL_CAST_FROM_STRING
|
2012-04-05 12:43:48 +02:00
|
|
|
DEFINES *= QT_USE_QSTRINGBUILDER
|
2012-02-18 14:47:38 +01:00
|
|
|
|
2012-03-23 17:29:12 +01:00
|
|
|
CONFIG(debug, debug|release): DEFINES *= QUPZILLA_DEBUG_BUILD
|
2012-03-10 14:37:05 +01:00
|
|
|
|
2012-02-18 14:47:38 +01:00
|
|
|
d_no_system_datapath = $$(NO_SYSTEM_DATAPATH)
|
|
|
|
d_use_webgl = $$(USE_WEBGL)
|
|
|
|
d_w7api = $$(W7API)
|
2013-05-19 10:52:44 +02:00
|
|
|
d_kde = $$(KDE) # Backwards compatibility
|
|
|
|
d_kde_integration = $$(KDE_INTEGRATION)
|
2014-01-02 17:55:21 +01:00
|
|
|
d_gnome_integration = $$(GNOME_INTEGRATION)
|
2013-03-23 14:16:08 +01:00
|
|
|
d_nox11 = $$(NO_X11)
|
2012-02-18 14:47:38 +01:00
|
|
|
d_portable = $$(PORTABLE_BUILD)
|
2012-03-10 15:25:54 +01:00
|
|
|
d_nonblock_dialogs = $$(NONBLOCK_JS_DIALOGS)
|
2012-03-16 13:53:49 +01:00
|
|
|
d_use_qtwebkit_2_2 = $$(USE_QTWEBKIT_2_2)
|
2012-04-04 23:43:37 +02:00
|
|
|
d_use_lib_path = $$(USE_LIBPATH)
|
2012-07-10 11:56:24 +02:00
|
|
|
d_disable_dbus = $$(DISABLE_DBUS)
|
2014-02-02 16:21:06 +01:00
|
|
|
d_disable_updates_check = $$(DISABLE_UPDATES_CHECK)
|
2012-02-18 14:47:38 +01:00
|
|
|
|
2012-03-23 17:29:12 +01:00
|
|
|
equals(d_no_system_datapath, "true") { DEFINES *= NO_SYSTEM_DATAPATH }
|
|
|
|
equals(d_use_webgl, "true") { DEFINES *= USE_WEBGL }
|
2012-08-11 00:29:08 +02:00
|
|
|
win32-msvc* {
|
|
|
|
equals(d_w7api, "true") { DEFINES *= W7API }
|
|
|
|
}
|
2013-05-20 01:10:37 +02:00
|
|
|
equals(d_kde, "true") { DEFINES *= KDE_INTEGRATION }
|
|
|
|
equals(d_kde_integration, "true") { DEFINES *= KDE_INTEGRATION }
|
2014-01-02 17:55:21 +01:00
|
|
|
equals(d_gnome_integration, "true") { DEFINES *= GNOME_INTEGRATION }
|
2013-03-23 14:16:08 +01:00
|
|
|
equals(d_nox11, "true") { DEFINES *= NO_X11 }
|
2012-03-23 17:29:12 +01:00
|
|
|
equals(d_portable, "true") { DEFINES *= PORTABLE_BUILD }
|
|
|
|
equals(d_nonblock_dialogs, "true") { DEFINES *= NONBLOCK_JS_DIALOGS }
|
|
|
|
equals(d_use_qtwebkit_2_2, "true") { DEFINES *= USE_QTWEBKIT_2_2 }
|
2012-07-10 11:56:24 +02:00
|
|
|
equals(d_disable_dbus, "true") { DEFINES *= DISABLE_DBUS }
|
2014-02-02 16:21:06 +01:00
|
|
|
equals(d_disable_updates_check, "true") { DEFINES *= DISABLE_UPDATES_CHECK }
|
2012-02-19 16:01:51 +01:00
|
|
|
|
|
|
|
!mac:unix {
|
2013-03-23 17:15:08 +01:00
|
|
|
x86libpath = /usr/lib/i386-linux-gnu
|
|
|
|
x64libpath = /usr/lib/x86_64-linux-gnu
|
|
|
|
system_lib_path = /usr/lib
|
|
|
|
|
|
|
|
contains(QMAKE_HOST.arch, x86):exists($$x86libpath) system_lib_path = $$x86libpath
|
|
|
|
contains(QMAKE_HOST.arch, x86_64):exists($$x64libpath) system_lib_path = $$x64libpath
|
|
|
|
|
2012-02-19 16:01:51 +01:00
|
|
|
d_prefix = $$(QUPZILLA_PREFIX)
|
2012-02-20 22:34:09 +01:00
|
|
|
binary_folder = /usr/bin
|
2013-03-23 17:15:08 +01:00
|
|
|
library_folder = $$system_lib_path
|
2012-02-19 16:01:51 +01:00
|
|
|
data_folder = /usr/share/qupzilla
|
2012-02-20 22:34:09 +01:00
|
|
|
launcher_folder = /usr/share/applications
|
|
|
|
icon_folder = /usr/share/pixmaps
|
|
|
|
hicolor_folder = /usr/share/icons/hicolor
|
2012-02-19 16:01:51 +01:00
|
|
|
|
|
|
|
!equals(d_prefix, "") {
|
2012-02-20 22:34:09 +01:00
|
|
|
binary_folder = "$$d_prefix"bin
|
|
|
|
library_folder = "$$d_prefix"lib
|
2012-02-19 16:01:51 +01:00
|
|
|
data_folder = "$$d_prefix"share/qupzilla
|
2012-02-20 22:34:09 +01:00
|
|
|
launcher_folder = "$$d_prefix"share/applications
|
|
|
|
icon_folder = "$$d_prefix"share/pixmaps
|
|
|
|
hicolor_folder = "$$d_prefix"share/icons/hicolor
|
2012-02-19 16:01:51 +01:00
|
|
|
}
|
|
|
|
|
2013-03-23 17:15:08 +01:00
|
|
|
!equals(d_use_lib_path, ""):library_folder = $$d_use_lib_path
|
2012-04-02 21:05:06 +02:00
|
|
|
|
2013-03-23 17:15:08 +01:00
|
|
|
DEFINES *= USE_LIBPATH=\\\"""$$library_folder/"\\\""
|
2012-03-23 17:29:12 +01:00
|
|
|
DEFINES *= USE_DATADIR=\\\"""$$data_folder/"\\\""
|
2012-02-19 16:01:51 +01:00
|
|
|
|
2012-12-22 12:47:45 +01:00
|
|
|
# Git revision
|
2012-02-23 22:07:05 +01:00
|
|
|
rev = $$system(cd ../ && sh $$PWD/../scripts/getrevision.sh)
|
2012-03-23 17:29:12 +01:00
|
|
|
!equals(rev, ""): DEFINES *= GIT_REVISION=\\\"""$$rev"\\\""
|
2012-12-22 12:47:45 +01:00
|
|
|
|
|
|
|
# Define QZ_WS_X11 even with Qt5
|
|
|
|
DEFINES *= QZ_WS_X11
|
2012-02-19 16:01:51 +01:00
|
|
|
}
|
2012-02-23 19:18:08 +01:00
|
|
|
|
|
|
|
isEmpty(QMAKE_LRELEASE) {
|
|
|
|
win32|os2:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]\\lrelease.exe
|
|
|
|
else:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]/lrelease
|
|
|
|
unix {
|
|
|
|
!exists($$QMAKE_LRELEASE) { QMAKE_LRELEASE = lrelease-qt4 }
|
|
|
|
} else {
|
|
|
|
!exists($$QMAKE_LRELEASE) { QMAKE_LRELEASE = lrelease }
|
|
|
|
}
|
|
|
|
}
|
2013-11-19 20:09:59 +01:00
|
|
|
|
|
|
|
isEmpty(QMAKE_LFLAGS_RPATH) {
|
|
|
|
QMAKE_LFLAGS_RPATH = -Wl,-rpath,
|
|
|
|
}
|