1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00
qTox/qtox.pro

330 lines
11 KiB
Prolog
Raw Normal View History

2014-07-07 00:38:05 +08:00
#-------------------------------------------------
#
# Project created by QtCreator 2014-06-22T14:07:35
#
#-------------------------------------------------
2014-07-07 00:19:45 +08:00
# Copyright (C) 2014 by Project Tox <https://tox.im>
#
# This file is part of qTox, a Qt-based graphical interface for Tox.
#
# This program is libre software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
# See the COPYING file for more details.
2015-02-05 05:19:43 +08:00
QT += core gui network xml opengl sql svg
2014-07-07 00:38:05 +08:00
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = qtox
2014-07-07 00:38:05 +08:00
TEMPLATE = app
FORMS += \
2014-10-08 12:26:25 +08:00
src/mainwindow.ui \
src/widget/form/settings/generalsettings.ui \
src/widget/form/settings/avsettings.ui \
src/widget/form/settings/identitysettings.ui \
src/widget/form/settings/privacysettings.ui \
src/widget/form/loadhistorydialog.ui \
2014-11-13 00:30:55 +08:00
src/widget/form/setpassworddialog.ui \
src/widget/form/settings/advancedsettings.ui \
src/android.ui
2014-07-07 00:38:05 +08:00
CONFIG += c++11
2014-11-07 21:08:02 +08:00
# Rules for creating/updating {ts|qm}-files
include(translations/i18n.pri)
# Build all the qm files now, to make RCC happy
system($$fromfile(translations/i18n.pri, updateallqm))
2014-07-07 00:38:05 +08:00
RESOURCES += res.qrc \
smileys/smileys.qrc
2014-07-07 00:38:05 +08:00
GIT_VERSION = $$system(git rev-parse HEAD 2> /dev/null || echo "built without git")
2014-11-01 14:17:50 +08:00
DEFINES += GIT_VERSION=\"\\\"$$quote($$GIT_VERSION)\\\"\"
# date works on linux/mac, but it would hangs qmake on windows
# This hack returns 0 on batch (windows), but executes "date +%s" or return 0 if it fails on bash (linux/mac)
TIMESTAMP = $$system($1 2>null||echo 0||a;rm null;date +%s||echo 0) # I'm so sorry
DEFINES += TIMESTAMP=$$TIMESTAMP
DEFINES += LOG_TO_FILE
contains(ENABLE_SYSTRAY_UNITY_BACKEND, YES) {
DEFINES += ENABLE_SYSTRAY_UNITY_BACKEND
INCLUDEPATH += "/usr/include/libappindicator-0.1"
INCLUDEPATH += "/usr/include/gtk-2.0"
INCLUDEPATH += "/usr/include/glib-2.0"
INCLUDEPATH += "/usr/lib/x86_64-linux-gnu/glib-2.0/include"
INCLUDEPATH += "/usr/include/cairo"
INCLUDEPATH += "/usr/include/pango-1.0"
INCLUDEPATH += "/usr/lib/x86_64-linux-gnu/gtk-2.0/include"
INCLUDEPATH += "/usr/include/gdk-pixbuf-2.0"
INCLUDEPATH += "/usr/include/atk-1.0"
INCLUDEPATH += "/usr/include/libdbusmenu-glib-0.4"
LIBS += -lgobject-2.0 -lappindicator -lgtk-x11-2.0
}
2015-02-06 08:27:07 +08:00
android {
ANDROID_TOOLCHAIN=/opt/android/toolchain-r9d-17/
INCLUDEPATH += $$ANDROID_TOOLCHAIN/include/
LIBS += -L$$ANDROID_TOOLCHAIN/lib
DISABLE_PLATFORM_EXT=YES
DISABLE_FILTER_AUDIO=YES
ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android
contains(ANDROID_TARGET_ARCH,armeabi) {
ANDROID_EXTRA_LIBS = \
$$ANDROID_TOOLCHAIN/lib/libopenal.so \
$$ANDROID_TOOLCHAIN/lib/libsodium.so
2015-02-06 08:27:07 +08:00
}
}
contains(DISABLE_PLATFORM_EXT, YES) {
} else {
DEFINES += QTOX_PLATFORM_EXT
}
2014-12-17 08:50:28 +08:00
contains(DISABLE_FILTER_AUDIO, YES) {
} else {
DEFINES += QTOX_FILTER_AUDIO
}
2014-09-02 02:33:04 +08:00
contains(JENKINS,YES) {
INCLUDEPATH += ./libs/include/
} else {
INCLUDEPATH += libs/include
}
# Rules for Windows, Mac OSX, and Linux
2014-07-07 00:38:05 +08:00
win32 {
2014-10-26 23:35:42 +08:00
RC_FILE = windows/qtox.rc
LIBS += -L$$PWD/libs/lib -ltoxav -ltoxcore -ltoxencryptsave -ltoxdns -lsodium -lvpx -lpthread
LIBS += -L$$PWD/libs/lib -lopencv_core249 -lopencv_highgui249 -lopencv_imgproc249 -lOpenAL32 -lopus
LIBS += -lopengl32 -lole32 -loleaut32 -luuid -lvfw32 -lws2_32 -liphlpapi -lz
contains(DEFINES, QTOX_FILTER_AUDIO) {
contains(STATICPKG, YES) {
LIBS += -Wl,-Bstatic -lfilteraudio
} else {
LIBS += -lfilteraudio
}
}
2014-07-07 00:38:05 +08:00
} else {
2014-09-08 06:41:21 +08:00
macx {
2014-11-06 14:57:46 +08:00
BUNDLEID = im.tox.qtox
ICON = img/icons/qtox.icns
2014-11-15 09:30:47 +08:00
QMAKE_INFO_PLIST = osx/info.plist
LIBS += -L$$PWD/libs/lib/ -ltoxcore -ltoxav -ltoxencryptsave -ltoxdns -lsodium -lvpx -framework OpenAL -lopencv_core -lopencv_highgui
contains(DEFINES, QTOX_PLATFORM_EXT) { LIBS += -framework IOKit -framework CoreFoundation }
2014-12-18 06:49:17 +08:00
contains(DEFINES, QTOX_FILTER_AUDIO) { LIBS += -lfilteraudio }
} else {
2015-02-06 08:27:07 +08:00
android {
LIBS += -ltoxcore -ltoxav -ltoxencryptsave -ltoxdns
LIBS += -lopencv_videoio -lopencv_imgcodecs -lopencv_highgui -lopencv_imgproc -lopencv_androidcamera
LIBS += -llibjpeg -llibwebp -llibpng -llibtiff -llibjasper -lIlmImf -lopencv_core
LIBS += -lopus -lvpx -lsodium -lopenal
2014-09-08 06:41:21 +08:00
} else {
2015-02-06 08:27:07 +08:00
# If we're building a package, static link libtox[core,av] and libsodium, since they are not provided by any package
2014-12-17 08:50:28 +08:00
contains(STATICPKG, YES) {
2015-02-06 08:27:07 +08:00
target.path = /usr/bin
INSTALLS += target
LIBS += -L$$PWD/libs/lib/ -lopus -lvpx -lopenal -Wl,-Bstatic -ltoxcore -ltoxav -ltoxencryptsave -ltoxdns -lsodium -lopencv_highgui -lopencv_imgproc -lopencv_core -lz -Wl,-Bdynamic
LIBS += -Wl,-Bstatic -ljpeg -ltiff -lpng -ljasper -lIlmImf -lIlmThread -lIex -ldc1394 -lraw1394 -lHalf -lz -llzma -ljbig
LIBS += -Wl,-Bdynamic -lv4l1 -lv4l2 -lavformat -lavcodec -lavutil -lswscale -lusb-1.0
2014-12-17 08:50:28 +08:00
} else {
2015-02-06 08:27:07 +08:00
LIBS += -L$$PWD/libs/lib/ -ltoxcore -ltoxav -ltoxencryptsave -ltoxdns -lvpx -lsodium -lopenal -lopencv_core -lopencv_highgui -lopencv_imgproc
}
contains(DEFINES, QTOX_PLATFORM_EXT) {
LIBS += -lX11 -lXss
2014-12-17 08:50:28 +08:00
}
2015-02-06 08:27:07 +08:00
contains(DEFINES, QTOX_FILTER_AUDIO) {
contains(STATICPKG, YES) {
LIBS += -Wl,-Bstatic -lfilteraudio
} else {
LIBS += -lfilteraudio
}
}
contains(JENKINS, YES) {
LIBS = ./libs/lib/libtoxav.a ./libs/lib/libvpx.a ./libs/lib/libopus.a ./libs/lib/libtoxdns.a ./libs/lib/libtoxencryptsave.a ./libs/lib/libtoxcore.a ./libs/lib/libsodium.a ./libs/lib/libfilteraudio.a /usr/lib/libopencv_core.so /usr/lib/libopencv_highgui.so /usr/lib/libopencv_imgproc.so -lopenal -lX11 -lXss -s
}
2014-09-08 06:41:21 +08:00
}
2014-09-02 02:33:04 +08:00
}
2014-07-07 00:38:05 +08:00
}
2014-10-08 12:26:25 +08:00
HEADERS += src/widget/form/addfriendform.h \
src/widget/form/chatform.h \
src/widget/form/groupchatform.h \
src/widget/form/settingswidget.h \
src/widget/form/settings/genericsettings.h \
src/widget/form/settings/generalform.h \
src/widget/form/settings/identityform.h \
src/widget/form/settings/privacyform.h \
src/widget/form/settings/avform.h \
src/widget/form/filesform.h \
src/widget/tool/chattextedit.h \
src/widget/tool/friendrequestdialog.h \
src/widget/friendwidget.h \
src/widget/groupwidget.h \
src/widget/widget.h \
src/friend.h \
src/group.h \
src/grouplist.h \
src/misc/settings.h \
src/core.h \
src/friendlist.h \
src/misc/cdata.h \
src/misc/cstring.h \
2014-10-24 04:07:44 +08:00
src/video/camera.h \
2014-10-08 12:26:25 +08:00
src/widget/netcamview.h \
src/misc/smileypack.h \
src/widget/emoticonswidget.h \
src/misc/style.h \
src/widget/adjustingscrollarea.h \
src/widget/croppinglabel.h \
src/widget/friendlistwidget.h \
src/widget/genericchatroomwidget.h \
src/widget/form/genericchatform.h \
src/widget/tool/chatactions/chataction.h \
src/widget/chatareawidget.h \
src/filetransferinstance.h \
src/corestructs.h \
src/coredefines.h \
src/coreav.h \
src/widget/tool/chatactions/messageaction.h \
src/widget/tool/chatactions/filetransferaction.h \
src/widget/tool/chatactions/systemmessageaction.h \
src/widget/tool/chatactions/actionaction.h \
src/widget/tool/chatactions/alertaction.h \
src/widget/maskablepixmapwidget.h \
2014-10-24 04:07:44 +08:00
src/video/videosource.h \
src/video/cameraworker.h \
src/widget/videosurface.h \
src/widget/form/loadhistorydialog.h \
2014-10-15 21:48:08 +08:00
src/historykeeper.h \
src/misc/db/genericddinterface.h \
src/misc/db/plaindb.h \
src/misc/db/encrypteddb.h \
src/widget/form/setpassworddialog.h \
2014-10-24 04:31:39 +08:00
src/widget/form/tabcompleter.h \
src/video/videoframe.h \
src/misc/flowlayout.h \
src/ipc.h \
src/widget/toxuri.h \
src/toxdns.h \
src/widget/toxsave.h \
src/autoupdate.h \
2014-11-13 00:30:55 +08:00
src/misc/serialize.h \
src/widget/form/settings/advancedform.h \
src/audio.h \
src/widget/callconfirmwidget.h \
src/widget/systemtrayicon.h \
src/widget/systemtrayicon_private.h \
src/nexus.h \
src/widget/gui.h \
src/widget/androidgui.h \
src/offlinemsgengine.h
2014-07-07 00:38:05 +08:00
SOURCES += \
2014-10-08 12:26:25 +08:00
src/widget/form/addfriendform.cpp \
src/widget/form/chatform.cpp \
src/widget/form/groupchatform.cpp \
src/widget/form/settingswidget.cpp \
src/widget/form/settings/generalform.cpp \
src/widget/form/settings/identityform.cpp \
src/widget/form/settings/privacyform.cpp \
src/widget/form/settings/avform.cpp \
src/widget/form/filesform.cpp \
src/widget/tool/chattextedit.cpp \
src/widget/tool/friendrequestdialog.cpp \
src/widget/friendwidget.cpp \
src/widget/groupwidget.cpp \
src/widget/widget.cpp \
src/core.cpp \
src/coreencryption.cpp \
2014-10-08 12:26:25 +08:00
src/friend.cpp \
src/friendlist.cpp \
src/group.cpp \
src/grouplist.cpp \
src/main.cpp \
src/misc/settings.cpp \
src/misc/cdata.cpp \
src/misc/cstring.cpp \
2014-10-24 04:07:44 +08:00
src/video/camera.cpp \
2014-10-08 12:26:25 +08:00
src/widget/netcamview.cpp \
src/misc/smileypack.cpp \
src/widget/emoticonswidget.cpp \
src/misc/style.cpp \
src/widget/adjustingscrollarea.cpp \
src/widget/croppinglabel.cpp \
src/widget/friendlistwidget.cpp \
src/coreav.cpp \
src/widget/genericchatroomwidget.cpp \
src/widget/form/genericchatform.cpp \
src/widget/tool/chatactions/chataction.cpp \
src/widget/chatareawidget.cpp \
src/filetransferinstance.cpp \
src/corestructs.cpp \
src/widget/tool/chatactions/messageaction.cpp \
src/widget/tool/chatactions/filetransferaction.cpp \
src/widget/tool/chatactions/systemmessageaction.cpp \
src/widget/tool/chatactions/actionaction.cpp \
src/widget/tool/chatactions/alertaction.cpp \
src/widget/maskablepixmapwidget.cpp \
2014-10-24 04:07:44 +08:00
src/video/cameraworker.cpp \
src/widget/videosurface.cpp \
src/widget/form/loadhistorydialog.cpp \
2014-10-15 21:48:08 +08:00
src/historykeeper.cpp \
src/misc/db/genericddinterface.cpp \
src/misc/db/plaindb.cpp \
src/misc/db/encrypteddb.cpp \
src/widget/form/setpassworddialog.cpp \
2014-10-24 04:07:44 +08:00
src/video/netvideosource.cpp \
2014-10-24 04:31:39 +08:00
src/widget/form/tabcompleter.cpp \
src/video/videoframe.cpp \
src/misc/flowlayout.cpp \
src/widget/toxuri.cpp \
src/toxdns.cpp \
src/ipc.cpp \
src/widget/toxsave.cpp \
src/autoupdate.cpp \
2014-11-13 00:30:55 +08:00
src/misc/serialize.cpp \
src/widget/form/settings/advancedform.cpp \
src/audio.cpp \
src/widget/callconfirmwidget.cpp \
src/widget/systemtrayicon.cpp \
src/nexus.cpp \
src/widget/gui.cpp \
src/widget/androidgui.cpp \
src/offlinemsgengine.cpp
2014-12-02 08:14:06 +08:00
contains(DEFINES, QTOX_FILTER_AUDIO) {
HEADERS += src/audiofilterer.h
SOURCES += src/audiofilterer.cpp
}
2014-12-02 08:14:06 +08:00
contains(DEFINES, QTOX_PLATFORM_EXT) {
HEADERS += src/platform/timer.h
SOURCES += src/platform/timer_osx.cpp \
src/platform/timer_win.cpp \
src/platform/timer_x11.cpp
2014-12-17 21:44:23 +08:00
HEADERS += src/platform/autorun.h
SOURCES += src/platform/autorun_win.cpp \
src/platform/autorun_xdg.cpp \
src/platform/autorun_osx.cpp
2014-12-02 08:14:06 +08:00
}