1 include(openpilotgcs
.pri
)
5 # Copy Qt runtime libraries into the build directory (to run or package)
12 QT_LIBS
= libQt5Core
.so
.5 \
21 libQt5Declarative
.so
.5 \
22 libQt5XmlPatterns
.so
.5 \
24 libQt5Concurrent
.so
.5 \
25 libQt5PrintSupport
.so
.5 \
26 libQt5SerialPort
.so
.5 \
27 libQt5Multimedia
.so
.5 \
28 libQt5MultimediaWidgets
.so
.5 \
32 libQt5QuickParticles
.so
.5 \
38 data_copy
.commands
+= -@$
(MKDIR
) $$
targetPath(\"$$GCS_QT_LIBRARY_PATH
\") $$
addNewline()
40 data_copy
.commands
+= $
(COPY_FILE
) $$
targetPath(\"$$
[QT_INSTALL_LIBS
]/$$lib
\") $$
targetPath(\"$$GCS_QT_LIBRARY_PATH
/$$lib
\") $$
addNewline()
43 # create Qt plugin directories
44 QT_PLUGIN_DIRS
= iconengines \
49 for(dir
, QT_PLUGIN_DIRS
) {
50 data_copy
.commands
+= -@$
(MKDIR
) $$
targetPath(\"$$GCS_QT_PLUGINS_PATH
/$$dir
\") $$
addNewline()
52 QT_PLUGIN_LIBS
= iconengines
/libqsvgicon
.so \
53 imageformats
/libqgif
.so \
54 imageformats
/libqico
.so \
55 imageformats
/libqjpeg
.so \
56 imageformats
/libqmng
.so \
57 imageformats
/libqsvg
.so \
58 imageformats
/libqtiff
.so \
59 mediaservice
/libgstaudiodecoder
.so \
60 mediaservice
/libgstmediaplayer
.so \
61 platforms
/libqxcb
.so \
62 sqldrivers
/libqsqlite
.so
63 for(lib
, QT_PLUGIN_LIBS
) {
64 data_copy
.commands
+= $
(COPY_FILE
) $$
targetPath(\"$$
[QT_INSTALL_PLUGINS
]/$$lib
\") $$
targetPath(\"$$GCS_QT_PLUGINS_PATH
/$$lib
\") $$
addNewline()
67 # create QtQuick2 plugin directories
68 QT_QUICK2_DIRS
= QtQuick \
71 QtQuick
/LocalStorage \
73 QtQuick
/PrivateWidgets \
76 for(dir
, QT_QUICK2_DIRS
) {
77 data_copy
.commands
+= -@$
(MKDIR
) $$
targetPath(\"$$GCS_QT_QML_PATH
/$$dir
\") $$
addNewline()
80 # Copy QtQuick2 complete directories
81 # These directories have a lot of files
82 # Easier to copy everything
83 QTQ_WHOLE_DIRS
= QtQuick
/Controls \
85 for(dir
, QTQ_WHOLE_DIRS
) {
86 data_copy
.commands
+= $
(COPY_DIR
) $$
targetPath(\"$$
[QT_INSTALL_QML
]/$$dir
\") $$
targetPath(\"$$GCS_QT_QML_PATH
/$$dir
\") $$
addNewline()
89 # Remaining QtQuick plugin libs
90 QT_QUICK2_DLLS
= QtQuick
.2/libqtquick2plugin
.so \
91 QtQuick
.2/plugins
.qmltypes \
93 QtQuick
/Layouts
/libqquicklayoutsplugin
.so \
94 QtQuick
/Layouts
/plugins
.qmltypes \
95 QtQuick
/Layouts
/qmldir \
96 QtQuick
/LocalStorage
/libqmllocalstorageplugin
.so \
97 QtQuick
/LocalStorage
/plugins
.qmltypes \
98 QtQuick
/LocalStorage
/qmldir \
99 QtQuick
/Particles
.2/libparticlesplugin
.so \
100 QtQuick
/Particles
.2/plugins
.qmltypes \
101 QtQuick
/Particles
.2/qmldir \
102 QtQuick
/PrivateWidgets
/libwidgetsplugin
.so \
103 QtQuick
/PrivateWidgets
/plugins
.qmltypes \
104 QtQuick
/PrivateWidgets
/qmldir \
105 QtQuick
/Window
.2/libwindowplugin
.so \
106 QtQuick
/Window
.2/plugins
.qmltypes \
107 QtQuick
/Window
.2/qmldir \
108 QtQuick
/XmlListModel
/libqmlxmllistmodelplugin
.so \
109 QtQuick
/XmlListModel
/plugins
.qmltypes \
110 QtQuick
/XmlListModel
/qmldir
112 for(lib
, QT_QUICK2_DLLS
) {
113 data_copy
.commands
+= $
(COPY_FILE
) $$
targetPath(\"$$
[QT_INSTALL_QML
]/$$lib
\") $$
targetPath(\"$$GCS_QT_QML_PATH
/$$lib
\") $$
addNewline()
116 data_copy
.target
= FORCE
117 QMAKE_EXTRA_TARGETS
+= data_copy
121 # set debug suffix if needed
122 CONFIG(debug
, debug
|release
):DS
= "d"
125 QT_DLLS
= Qt5Core$$
{DS
}.dll \
127 Qt5Widgets$$
{DS
}.dll \
128 Qt5Network$$
{DS
}.dll \
129 Qt5OpenGL$$
{DS
}.dll \
134 Qt5Declarative$$
{DS
}.dll \
135 Qt5XmlPatterns$$
{DS
}.dll \
136 Qt5Script$$
{DS
}.dll \
137 Qt5Concurrent$$
{DS
}.dll \
138 Qt5PrintSupport$$
{DS
}.dll \
139 Qt5OpenGL$$
{DS
}.dll \
140 Qt5SerialPort$$
{DS
}.dll \
141 Qt5Multimedia$$
{DS
}.dll \
142 Qt5MultimediaWidgets$$
{DS
}.dll \
148 # it is more robust to take the following DLLs from Qt rather than from MinGW
149 QT_DLLS
+= libgcc_s_dw2
-1.dll \
153 data_copy
.commands
+= $
(COPY_FILE
) $$
targetPath(\"$$
[QT_INSTALL_BINS
]/$$dll
\") $$
targetPath(\"$$GCS_APP_PATH
/$$dll
\") $$
addNewline()
156 # create Qt plugin directories
157 QT_PLUGIN_DIRS
= iconengines \
163 for(dir
, QT_PLUGIN_DIRS
) {
164 data_copy
.commands
+= -@$
(MKDIR
) $$
targetPath(\"$$GCS_APP_PATH
/$$dir
\") $$
addNewline()
167 # copy Qt plugin DLLs
168 QT_PLUGIN_DLLS
= iconengines
/qsvgicon$$
{DS
}.dll \
169 imageformats
/qgif$$
{DS
}.dll \
170 imageformats
/qico$$
{DS
}.dll \
171 imageformats
/qjpeg$$
{DS
}.dll \
172 imageformats
/qmng$$
{DS
}.dll \
173 imageformats
/qsvg$$
{DS
}.dll \
174 imageformats
/qtiff$$
{DS
}.dll \
175 platforms
/qwindows$$
{DS
}.dll \
176 mediaservice
/dsengine$$
{DS
}.dll \
177 sqldrivers
/qsqlite$$
{DS
}.dll
178 for(dll
, QT_PLUGIN_DLLS
) {
179 data_copy
.commands
+= $
(COPY_FILE
) $$
targetPath(\"$$
[QT_INSTALL_PLUGINS
]/$$dll
\") $$
targetPath(\"$$GCS_APP_PATH
/$$dll
\") $$
addNewline()
182 # create QtQuick2 plugin directories
183 QT_QUICK2_DIRS
= qtquick \
186 qtquick
/localstorage \
187 qtquick
/particles
.2 \
188 qtquick
/privatewidgets \
191 for(dir
, QT_QUICK2_DIRS
) {
192 data_copy
.commands
+= -@$
(MKDIR
) $$
targetPath(\"$$GCS_APP_PATH
/$$dir
\") $$
addNewline()
195 # Copy QtQuick2 complete directories
196 # These directories have a lot of files
197 # Easier to copy everything
198 QTQ_WHOLE_DIRS
= qtquick
/controls \
200 for(dir
, QTQ_WHOLE_DIRS
) {
201 data_copy
.commands
+= $
(COPY_DIR
) $$
targetPath(\"$$
[QT_INSTALL_QML
]/$$dir
\") $$
targetPath(\"$$GCS_APP_PATH
/$$dir
\") $$
addNewline()
204 # Remaining QtQuick plugin DLLs
205 QT_QUICK2_DLLS
= QtQuick
.2/qtquick2plugin$$
{DS
}.dll \
206 QtQuick
.2/plugins
.qmltypes \
208 qtquick
/layouts
/qquicklayoutsplugin$$
{DS
}.dll \
209 qtquick
/layouts
/plugins
.qmltypes \
210 qtquick
/layouts
/qmldir \
211 qtquick
/localstorage
/qmllocalstorageplugin$$
{DS
}.dll \
212 qtquick
/localstorage
/plugins
.qmltypes \
213 qtquick
/localstorage
/qmldir \
214 qtquick
/particles
.2/particlesplugin$$
{DS
}.dll \
215 qtquick
/particles
.2/plugins
.qmltypes \
216 qtquick
/particles
.2/qmldir \
217 qtquick
/privatewidgets
/widgetsplugin$$
{DS
}.dll \
218 qtquick
/privatewidgets
/plugins
.qmltypes \
219 qtquick
/privatewidgets
/qmldir \
220 qtquick
/window
.2/windowplugin$$
{DS
}.dll \
221 qtquick
/window
.2/plugins
.qmltypes \
222 qtquick
/window
.2/qmldir \
223 qtquick
/XmlListModel
/qmlxmllistmodelplugin$$
{DS
}.dll \
224 qtquick
/XmlListModel
/plugins
.qmltypes \
225 qtquick
/XmlListModel
/qmldir
227 for(dll
, QT_QUICK2_DLLS
) {
228 data_copy
.commands
+= $
(COPY_FILE
) $$
targetPath(\"$$
[QT_INSTALL_QML
]/$$dll
\") $$
targetPath(\"$$GCS_APP_PATH
/$$dll
\") $$
addNewline()
235 for(dll
, OPENSSL_DLLS
) {
236 data_copy
.commands
+= $
(COPY_FILE
) $$
targetPath(\"$$
(OPENSSL_DIR
)/$$dll
\") $$
targetPath(\"$$GCS_APP_PATH
/$$dll
\") $$
addNewline()
241 opengl32_32
/opengl32
.dll
242 for(dll
, OPENGL_DLLS
) {
243 data_copy
.commands
+= $
(COPY_FILE
) $$
targetPath(\"$$
(MESAWIN_DIR
)/$$dll
\") $$
targetPath(\"$$GCS_APP_PATH
/$$dll
\") $$
addNewline()
246 data_copy
.target
= FORCE
247 QMAKE_EXTRA_TARGETS
+= data_copy
252 #NOTE: debug dylib can be copied as they will be cleaned out with packaging scripts
253 #standard plugins directory (will copy just dylib, plugins.qmltypes and qmldir
254 QT_QUICK2_PLUGINS
= QtQuick
.2 QtQuick
/Layouts QtQuick
/LocalStorage QtQuick
/Particles
.2 QtQuick
/PrivateWidgets QtQuick
/Window
.2 QtQuick
/XmlListModel
255 #those directories will be fully copied to dest
256 QT_QUICK2_FULL_DIRS
= QtQuick
/Controls QtQuick
/Dialogs
258 #create QtQuick dir (that will host all subdirs)
259 data_copy
.commands
+= -@$
(MKDIR
) $$
targetPath(\"$$GCS_QT_QML_PATH
/QtQuick
\") $$
addNewline()
261 for(dir
, QT_QUICK2_FULL_DIRS
) {
262 #data_copy.commands += -@$(MKDIR) $$targetPath(\"$$GCS_QT_QML_PATH/$$dir\") $$addNewline()
263 data_copy
.commands
+= $
(COPY_DIR
) $$
targetPath(\"$$
[QT_INSTALL_QML
]/$$dir
\") $$
targetPath(\"$$GCS_QT_QML_PATH
/$$dir
\") $$
addNewline()
266 for(lib
, QT_QUICK2_PLUGINS
) {
267 data_copy
.commands
+= $
(MKDIR
) $$
targetPath(\"$$GCS_QT_QML_PATH
/$$lib
\") $$
addNewline()
268 data_copy
.commands
+= $
(COPY_FILE
) $$
targetPath(\"$$
[QT_INSTALL_QML
]/$$lib
/\"*.dylib
) $$
targetPath(\"$$GCS_QT_QML_PATH
/$$lib
/\") $$
addNewline()
269 data_copy
.commands
+= $
(COPY_FILE
) $$
targetPath(\"$$
[QT_INSTALL_QML
]/$$lib
/plugins
.qmltypes
\") $$
targetPath(\"$$GCS_QT_QML_PATH
/$$lib
/plugins
.qmltypes
\") $$
addNewline()
270 data_copy
.commands
+= $
(COPY_FILE
) $$
targetPath(\"$$
[QT_INSTALL_QML
]/$$lib
/qmldir
\") $$
targetPath(\"$$GCS_QT_QML_PATH
/$$lib
/qmldir
\") $$
addNewline()
273 data_copy
.target
= FORCE
274 QMAKE_EXTRA_TARGETS
+= data_copy