blob: 13a175624eab3f526f6fe8b4d4f6b080d7e1882a [file] [log] [blame]
Sébastien Blin1f915762020-08-03 13:27:42 -04001win32-msvc {
2 TARGET = Jami
3 TEMPLATE = vcapp
4
5 QT += core winextras qml quickcontrols2 quick xml multimedia network webengine svg sql
6
7 CONFIG += suppress_vcproj_warnings c++17 qtquickcompiler
8
9 QTQUICK_COMPILER_SKIPPED_RESOURCES += ./ressources.qrc
10
11 # compiler options
12 QMAKE_CXXFLAGS += /wd"4068" /wd"4099" /wd"4189" /wd"4267" /wd"4577" /wd"4467" /wd"4715" /wd"4828"
13 QMAKE_CXXFLAGS += /MP /GS /W3 /Gy /Zc:wchar_t /Zi /Gm- /O2 /Zc:inline /fp:precise /errorReport:prompt
14 QMAKE_CXXFLAGS += /Gd /Oi /MD /std:c++17 /FC /EHsc /nologo /sdl
15
16 # linker options
17 QMAKE_LFLAGS+= /ignore:4006,4049,4078,4098 /FORCE:MULTIPLE /INCREMENTAL:NO /Debug /LTCG /NODEFAULTLIB:LIBCMT
18
19 # preprocessor defines
20 DEFINES += UNICODE QT_NO_DEBUG NDEBUG
21
22 # dependencies
23 LRC= ../lrc
24 DRING= ../daemon
25 QRENCODE= qrencode-win32/qrencode-win32
26
27 # client deps
28 INCLUDEPATH += $${QRENCODE}
29 LIBS += $${QRENCODE}/vc8/qrcodelib/x64/Release-Lib/qrcodelib.lib
30
31 # lrc
32 INCLUDEPATH += $${LRC}/src/
33 LIBS += $${LRC}/msvc/release/ringclient_static.lib
34 LIBS += $${LRC}/msvc/src/qtwrapper/Release/qtwrapper.lib
35
36 # daemon
37 INCLUDEPATH += ../daemon/contrib/msvc/include/
38 LIBS += $${DRING}/build-local/x64/ReleaseLib_win32/bin/dring.lib
39 LIBS += $${DRING}/contrib/msvc/lib/x64/libgnutls.lib
40
41 # windows system libs
42 LIBS += Shell32.lib Ole32.lib Advapi32.lib Shlwapi.lib User32.lib Gdi32.lib Crypt32.lib Strmiids.lib
43
44 # output paths
45 OBJECTS_DIR = obj/.obj
46 MOC_DIR = obj/.moc
47 RCC_DIR = obj/.rcc
48 UI_DIR = obj/.ui
49
50 # ReleaseCompile config
51 contains(CONFIG, ReleaseCompile) {
52 CONFIG(ReleaseCompile) {
53 message(ReleaseCompile config enabled)
54 Release: DEFINES += COMPILE_ONLY
55 }
56 }
57
58 # beta config
59 contains(CONFIG, Beta) {
60 CONFIG(Beta) {
61 message(Beta config enabled)
62 Release: DESTDIR = x64/Beta
63 Release: DEFINES += BETA
64 }
65 } else {
66 Release: DESTDIR = x64/Release
67 }
68 Debug: DESTDIR = x64/Debug
69
70 # qt dir
71 QMAKE_INCDIR_QT=$(QTDIR)\include
72 QMAKE_LIBDIR=$(QTDIR)\lib
73 QMAKE_MOC=$(QTDIR)\bin\moc.exe
74 QMAKE_QMAKE=$(QTDIR)\bin\qmake.exe
75
76 # exe icons
77 Release: RC_FILE = ico.rc
78}
79
80unix {
81 TARGET = jami-qt
82 TEMPLATE = app
83
84 QT += quick quickwidgets widgets xml multimedia multimediawidgets network webenginewidgets svg quickcontrols2 webengine webenginecore sql dbus
85
86 #check Qt version
87 QT_VERSION = $$[QT_VERSION]
88 QT_VERSION = $$split(QT_VERSION, ".")
89 QT_VER_MAJ = $$member(QT_VERSION, 0)
90 QT_VER_MIN = $$member(QT_VERSION, 1)
91
92 lessThan(QT_VER_MIN, 12) {
93 QMAKE_CXXFLAGS += -std=c++17
94 }
95 greaterThan(QT_VER_MIN, 12) | equals(QT_VER_MIN, 12) {
96 CONFIG += c++17
97 }
98
99 isEmpty(LRC) { LRC=../../install/lrc/ }
100
101 INCLUDEPATH += $${LRC}/include/libringclient
102 INCLUDEPATH += $${LRC}/include
103 INCLUDEPATH += ../src
104
105 LIBS += -L$${LRC}/lib -lringclient
106 LIBS += -lqrencode
107}
108
109# Input
110HEADERS += ./src/smartlistmodel.h \
111 ./src/utils.h \
112 ./src/bannedlistmodel.h \
113 ./src/version.h \
114 ./src/accountlistmodel.h \
115 ./src/runguard.h \
116 ./src/lrcinstance.h \
117 ./src/globalsystemtray.h \
118 ./src/settingskey.h \
119 ./src/webchathelpers.h \
120 ./src/pixbufmanipulator.h \
121 ./src/rendermanager.h \
122 ./src/connectivitymonitor.h \
123 ./src/jamiavatartheme.h \
124 ./src/mainapplication.h \
125 ./src/qrimageprovider.h \
126 ./src/messagesadapter.h \
127 ./src/accountadapter.h \
128 ./src/tintedbuttonimageprovider.h \
129 ./src/calladapter.h \
130 ./src/conversationsadapter.h \
131 ./src/distantrenderer.h \
132 ./src/previewrenderer.h \
133 ./src/qmladapterbase.h \
134 ./src/avadapter.h \
135 ./src/contactadapter.h \
136 ./src/settingsadaptor.h \
137 ./src/deviceitemlistmodel.h \
138 ./src/pluginitemlistmodel.h \
139 ./src/preferenceitemlistmodel.h \
140 ./src/audiocodeclistmodel.h \
141 ./src/videocodeclistmodel.h \
142 ./src/accountstomigratelistmodel.h \
143 ./src/clientwrapper.h \
144 ./src/audioinputdevicemodel.h \
145 ./src/videoinputdevicemodel.h \
146 ./src/audiooutputdevicemodel.h \
147 ./src/videoformatfpsmodel.h \
148 ./src/videoformatresolutionmodel.h \
149 ./src/audiomanagerlistmodel.h
150SOURCES += ./src/bannedlistmodel.cpp \
151 ./src/accountlistmodel.cpp \
152 ./src/runguard.cpp \
153 ./src/webchathelpers.cpp \
154 ./src/main.cpp \
155 ./src/globalsystemtray.cpp \
156 ./src/smartlistmodel.cpp \
157 ./src/utils.cpp \
158 ./src/pixbufmanipulator.cpp \
159 ./src/rendermanager.cpp \
160 ./src/connectivitymonitor.cpp \
161 ./src/mainapplication.cpp \
162 ./src/messagesadapter.cpp \
163 ./src/accountadapter.cpp \
164 ./src/calladapter.cpp \
165 ./src/conversationsadapter.cpp \
166 ./src/distantrenderer.cpp \
167 ./src/previewrenderer.cpp \
168 ./src/qmladapterbase.cpp \
169 ./src/avadapter.cpp \
170 ./src/contactadapter.cpp \
171 ./src/settingsadaptor.cpp \
172 ./src/deviceitemlistmodel.cpp \
173 ./src/pluginitemlistmodel.cpp \
174 ./src/preferenceitemlistmodel.cpp \
175 ./src/audiocodeclistmodel.cpp \
176 ./src/videocodeclistmodel.cpp \
177 ./src/accountstomigratelistmodel.cpp \
178 ./src/clientwrapper.cpp \
179 ./src/audioinputdevicemodel.cpp \
180 ./src/videoinputdevicemodel.cpp \
181 ./src/audiooutputdevicemodel.cpp \
182 ./src/videoformatfpsmodel.cpp \
183 ./src/videoformatresolutionmodel.cpp \
184 ./src/audiomanagerlistmodel.cpp
185RESOURCES += ./ressources.qrc \
186 ./qml.qrc