From d222361663a18598c92a1c9c5a99808b1c90e2e6 Mon Sep 17 00:00:00 2001 From: Philippe Renon Date: Fri, 22 Jan 2016 22:04:10 +0100 Subject: [PATCH] cleanup all copydata.pro files --- ground/gcs/copydata.pro | 296 +++++++++--------- ground/gcs/gcs.pro | 10 +- ground/gcs/src/libs/sdlgamepad/copydata.pro | 15 +- ground/gcs/src/libs/sdlgamepad/sdlgamepad.pro | 9 +- .../plugins/hitl/aerosimrc/src/copydata.pro | 36 +++ .../src/plugins/hitl/aerosimrc/src/plugin.pro | 47 +-- 6 files changed, 216 insertions(+), 197 deletions(-) create mode 100644 ground/gcs/src/plugins/hitl/aerosimrc/src/copydata.pro diff --git a/ground/gcs/copydata.pro b/ground/gcs/copydata.pro index b5c2f4329..2cd01a882 100644 --- a/ground/gcs/copydata.pro +++ b/ground/gcs/copydata.pro @@ -3,151 +3,167 @@ include(gcs.pri) TEMPLATE = aux # Copy Qt runtime libraries into the build directory (to run or package) -equals(copyqt, 1) { - linux { - QT_LIBS = libQt5Core.so.5 \ - libQt5Gui.so.5 \ - libQt5Widgets.so.5 \ - libQt5Network.so.5 \ - libQt5OpenGL.so.5 \ - libQt5Sql.so.5 \ - libQt5Svg.so.5 \ - libQt5Test.so.5 \ - libQt5Xml.so.5 \ - libQt5XmlPatterns.so.5 \ - libQt5Script.so.5 \ - libQt5Concurrent.so.5 \ - libQt5PrintSupport.so.5 \ - libQt5SerialPort.so.5 \ - libQt5Multimedia.so.5 \ - libQt5MultimediaWidgets.so.5 \ - libQt5Quick.so.5 \ - libQt5QuickWidgets.so.5 \ - libQt5Qml.so.5 \ - libQt5DBus.so.5 \ - libQt5QuickParticles.so.5 \ - libQt5XcbQpa.so.5 \ - libQt5X11Extras.so.5 \ - libicui18n.so.54 \ - libicuuc.so.54 \ - libicudata.so.54 - contains(QT_ARCH, x86_64) { - QT_LIBS += libqgsttools_p.so.1 - } - for(lib, QT_LIBS) { - addCopyFileTarget($${lib},$$[QT_INSTALL_LIBS],$${GCS_QT_LIBRARY_PATH}) - } - QT_PLUGINS = iconengines/libqsvgicon.so \ - imageformats/libqgif.so \ - imageformats/libqico.so \ - imageformats/libqjpeg.so \ - imageformats/libqmng.so \ - imageformats/libqsvg.so \ - imageformats/libqtiff.so \ - platforms/libqxcb.so \ - xcbglintegrations/libqxcb-glx-integration.so \ - sqldrivers/libqsqlite.so - contains(QT_ARCH, x86_64) { - QT_PLUGINS += mediaservice/libgstaudiodecoder.so \ - mediaservice/libgstmediaplayer.so - } else { - QT_PLUGINS += mediaservice/libqtmedia_audioengine.so - } +linux { + QT_LIBS = \ + libQt5Core.so.5 \ + libQt5Gui.so.5 \ + libQt5Widgets.so.5 \ + libQt5Network.so.5 \ + libQt5OpenGL.so.5 \ + libQt5Sql.so.5 \ + libQt5Svg.so.5 \ + libQt5Test.so.5 \ + libQt5Xml.so.5 \ + libQt5XmlPatterns.so.5 \ + libQt5Script.so.5 \ + libQt5Concurrent.so.5 \ + libQt5PrintSupport.so.5 \ + libQt5SerialPort.so.5 \ + libQt5Multimedia.so.5 \ + libQt5MultimediaWidgets.so.5 \ + libQt5Quick.so.5 \ + libQt5QuickWidgets.so.5 \ + libQt5Qml.so.5 \ + libQt5DBus.so.5 \ + libQt5QuickParticles.so.5 \ + libQt5XcbQpa.so.5 \ + libQt5X11Extras.so.5 \ + libicui18n.so.54 \ + libicuuc.so.54 \ + libicudata.so.54 + + contains(QT_ARCH, x86_64) { + QT_LIBS += \ + libqgsttools_p.so.1 } - win32 { - # set debug suffix if needed - CONFIG(debug, debug|release):DS = "d" - - # copy Qt DLLs - QT_DLLS = Qt5Core$${DS}.dll \ - Qt5Gui$${DS}.dll \ - Qt5Widgets$${DS}.dll \ - Qt5Network$${DS}.dll \ - Qt5OpenGL$${DS}.dll \ - Qt5Sql$${DS}.dll \ - Qt5Svg$${DS}.dll \ - Qt5Test$${DS}.dll \ - Qt5Xml$${DS}.dll \ - Qt5XmlPatterns$${DS}.dll \ - Qt5Script$${DS}.dll \ - Qt5Concurrent$${DS}.dll \ - Qt5PrintSupport$${DS}.dll \ - Qt5SerialPort$${DS}.dll \ - Qt5Multimedia$${DS}.dll \ - Qt5MultimediaWidgets$${DS}.dll \ - Qt5Quick$${DS}.dll \ - Qt5QuickWidgets$${DS}.dll \ - Qt5Qml$${DS}.dll \ - libicuin56.dll \ - libicudt56.dll \ - libicuuc56.dll \ - libstdc++-6.dll \ - libwinpthread-1.dll \ - libpcre16-0.dll \ - zlib1.dll \ - libharfbuzz-0.dll \ - libfreetype-6.dll \ - libbz2-1.dll \ - libpng16-16.dll \ - libglib-2.0-0.dll \ - libintl-8.dll \ - libiconv-2.dll - contains(QT_ARCH, i386) { - QT_DLLS += libgcc_s_dw2-1.dll - } else { - QT_DLLS += libgcc_s_seh-1.dll - } - - for(dll, QT_DLLS) { - addCopyFileTarget($${dll},$$[QT_INSTALL_BINS],$${GCS_APP_PATH}) - } - - # copy OpenSSL DLLs - OPENSSL_DLLS = \ - ssleay32.dll \ - libeay32.dll - for(dll, OPENSSL_DLLS) { - addCopyFileTarget($${dll},$$[QT_INSTALL_BINS],$${GCS_APP_PATH}) - } - - # copy OpenGL DLL - OPENGL_DLLS = \ - opengl32.dll - for(dll, OPENGL_DLLS) { - addCopyFileTarget($${dll},$$[QT_INSTALL_BINS],$${GCS_APP_PATH}/opengl32) - } - - QT_PLUGINS = iconengines/qsvgicon$${DS}.dll \ - imageformats/qgif$${DS}.dll \ - imageformats/qico$${DS}.dll \ - imageformats/qjpeg$${DS}.dll \ - imageformats/qmng$${DS}.dll \ - imageformats/qsvg$${DS}.dll \ - imageformats/qtiff$${DS}.dll \ - platforms/qwindows$${DS}.dll \ - mediaservice/dsengine$${DS}.dll \ - sqldrivers/qsqlite$${DS}.dll + for(lib, QT_LIBS) { + addCopyFileTarget($${lib},$$[QT_INSTALL_LIBS],$${GCS_QT_LIBRARY_PATH}) } - for(plugin, QT_PLUGINS) { - addCopyFileTarget($${plugin},$$[QT_INSTALL_PLUGINS],$${GCS_QT_PLUGINS_PATH}) - } + QT_PLUGINS = \ + iconengines/libqsvgicon.so \ + imageformats/libqgif.so \ + imageformats/libqico.so \ + imageformats/libqjpeg.so \ + imageformats/libqmng.so \ + imageformats/libqsvg.so \ + imageformats/libqtiff.so \ + platforms/libqxcb.so \ + xcbglintegrations/libqxcb-glx-integration.so \ + sqldrivers/libqsqlite.so - # Copy QtQuick2 complete directories - # Some of these directories have a lot of files - # Easier to copy everything - QT_QUICK2_DIRS = QtQuick/Controls \ - QtQuick/Dialogs \ - QtQuick/Layouts \ - QtQuick/LocalStorage \ - QtQuick/Particles.2 \ - QtQuick/PrivateWidgets \ - QtQuick/Window.2 \ - QtQuick/XmlListModel \ - QtQuick.2 - for(dir, QT_QUICK2_DIRS) { - addCopyDirTarget($${dir},$$[QT_INSTALL_QML],$${GCS_QT_QML_PATH}) + contains(QT_ARCH, x86_64) { + QT_PLUGINS += \ + mediaservice/libgstaudiodecoder.so \ + mediaservice/libgstmediaplayer.so + } else { + QT_PLUGINS += \ + mediaservice/libqtmedia_audioengine.so } } + +win32 { + # set debug suffix if needed + CONFIG(debug, debug|release):DS = "d" + + # copy Qt DLLs + QT_DLLS = \ + Qt5Core$${DS}.dll \ + Qt5Gui$${DS}.dll \ + Qt5Widgets$${DS}.dll \ + Qt5Network$${DS}.dll \ + Qt5OpenGL$${DS}.dll \ + Qt5Sql$${DS}.dll \ + Qt5Svg$${DS}.dll \ + Qt5Test$${DS}.dll \ + Qt5Xml$${DS}.dll \ + Qt5XmlPatterns$${DS}.dll \ + Qt5Script$${DS}.dll \ + Qt5Concurrent$${DS}.dll \ + Qt5PrintSupport$${DS}.dll \ + Qt5SerialPort$${DS}.dll \ + Qt5Multimedia$${DS}.dll \ + Qt5MultimediaWidgets$${DS}.dll \ + Qt5Quick$${DS}.dll \ + Qt5QuickWidgets$${DS}.dll \ + Qt5Qml$${DS}.dll \ + libicuin56.dll \ + libicudt56.dll \ + libicuuc56.dll \ + libstdc++-6.dll \ + libwinpthread-1.dll \ + libpcre16-0.dll \ + zlib1.dll \ + libharfbuzz-0.dll \ + libfreetype-6.dll \ + libbz2-1.dll \ + libpng16-16.dll \ + libglib-2.0-0.dll \ + libintl-8.dll \ + libiconv-2.dll + + contains(QT_ARCH, i386) { + QT_DLLS += \ + libgcc_s_dw2-1.dll + } else { + QT_DLLS += \ + libgcc_s_seh-1.dll + } + + for(dll, QT_DLLS) { + addCopyFileTarget($${dll},$$[QT_INSTALL_BINS],$${GCS_APP_PATH}) + } + + # copy OpenSSL DLLs + OPENSSL_DLLS = \ + ssleay32.dll \ + libeay32.dll + + for(dll, OPENSSL_DLLS) { + addCopyFileTarget($${dll},$$[QT_INSTALL_BINS],$${GCS_APP_PATH}) + } + + # copy OpenGL DLL + OPENGL_DLLS = \ + opengl32.dll + + for(dll, OPENGL_DLLS) { + addCopyFileTarget($${dll},$$[QT_INSTALL_BINS],$${GCS_APP_PATH}/opengl32) + } + + QT_PLUGINS = \ + iconengines/qsvgicon$${DS}.dll \ + imageformats/qgif$${DS}.dll \ + imageformats/qico$${DS}.dll \ + imageformats/qjpeg$${DS}.dll \ + imageformats/qmng$${DS}.dll \ + imageformats/qsvg$${DS}.dll \ + imageformats/qtiff$${DS}.dll \ + platforms/qwindows$${DS}.dll \ + mediaservice/dsengine$${DS}.dll \ + sqldrivers/qsqlite$${DS}.dll +} + +for(plugin, QT_PLUGINS) { + addCopyFileTarget($${plugin},$$[QT_INSTALL_PLUGINS],$${GCS_QT_PLUGINS_PATH}) +} + +# Copy QtQuick2 complete directories +# Some of these directories have a lot of files +# Easier to copy everything +QT_QUICK2_DIRS = \ + QtQuick/Controls \ + QtQuick/Dialogs \ + QtQuick/Layouts \ + QtQuick/LocalStorage \ + QtQuick/Particles.2 \ + QtQuick/PrivateWidgets \ + QtQuick/Window.2 \ + QtQuick/XmlListModel \ + QtQuick.2 + +for(dir, QT_QUICK2_DIRS) { + addCopyDirTarget($${dir},$$[QT_INSTALL_QML],$${GCS_QT_QML_PATH}) +} diff --git a/ground/gcs/gcs.pro b/ground/gcs/gcs.pro index e2e29d52d..29346e77f 100644 --- a/ground/gcs/gcs.pro +++ b/ground/gcs/gcs.pro @@ -1,6 +1,7 @@ # -# Qmake project for the OpenPilot GCS. +# Qmake project for the LibrePilot GCS. # Copyright (c) 2009-2013, The OpenPilot Team, http://www.openpilot.org +# Copyright (c) 2015-2016, The LibrePilot Team, http://www.librepilot.org # cache() @@ -31,6 +32,9 @@ CONFIG += ordered DEFINES += USE_PATHPLANNER -SUBDIRS = src copydata +SUBDIRS = src -copydata.file = copydata.pro +equals(copyqt, 1) { + SUBDIRS += copydata + copydata.file = copydata.pro +} diff --git a/ground/gcs/src/libs/sdlgamepad/copydata.pro b/ground/gcs/src/libs/sdlgamepad/copydata.pro index ce6d8ff01..296060496 100644 --- a/ground/gcs/src/libs/sdlgamepad/copydata.pro +++ b/ground/gcs/src/libs/sdlgamepad/copydata.pro @@ -1,10 +1,9 @@ -equals(copydata, 1) { - win32 { - # copy SDL DLL - SDL_DLLS = \ - SDL.dll - for(dll, SDL_DLLS) { - addCopyFileTarget($${dll},$$[QT_INSTALL_BINS],$${GCS_APP_PATH}) - } +win32 { + # copy SDL DLL + SDL_DLLS = \ + SDL.dll + + for(dll, SDL_DLLS) { + addCopyFileTarget($${dll},$$[QT_INSTALL_BINS],$${GCS_APP_PATH}) } } diff --git a/ground/gcs/src/libs/sdlgamepad/sdlgamepad.pro b/ground/gcs/src/libs/sdlgamepad/sdlgamepad.pro index 3182f85ab..8f7211245 100644 --- a/ground/gcs/src/libs/sdlgamepad/sdlgamepad.pro +++ b/ground/gcs/src/libs/sdlgamepad/sdlgamepad.pro @@ -28,19 +28,16 @@ macx { # Ensures that SDL framework and header files are found when compiled with Qt5.2.1 INCLUDEPATH += /Library/Frameworks/SDL.framework/Headers SDL = -F/Library/Frameworks + # Add SDL to CFLAGS fixes build problems on mac QMAKE_CFLAGS += $$SDL QMAKE_CXXFLAGS += $$SDL + # Let the linker know where to find the frameworks LIBS += $$SDL LIBS += -framework OpenGL -framework SDL -framework Cocoa } -win32 { - INCLUDEPATH += $${SDL_DIR}/include - LIBS += -L$${SDL_DIR}/lib -} - !mac:LIBS += -lSDL SOURCES += \ @@ -56,4 +53,4 @@ OTHER_FILES += \ sdlgamepad.dox \ sdlgamepad.doc -include(copydata.pro) +equals(copydata, 1):include(copydata.pro) diff --git a/ground/gcs/src/plugins/hitl/aerosimrc/src/copydata.pro b/ground/gcs/src/plugins/hitl/aerosimrc/src/copydata.pro new file mode 100644 index 000000000..6174ea728 --- /dev/null +++ b/ground/gcs/src/plugins/hitl/aerosimrc/src/copydata.pro @@ -0,0 +1,36 @@ +# Windows only + +# set debug suffix if needed +win32:CONFIG(debug, debug|release):DS = "d" + +win32 { + # resources and sample configuration + PLUGIN_RESOURCES = \ + cc_off.tga \ + cc_off_hover.tga \ + cc_on.tga \ + cc_on_hover.tga \ + cc_plugin.ini \ + plugin.txt + + for(res, PLUGIN_RESOURCES) { + addCopyFileTarget($${res},$${RES_DIR},$${PLUGIN_DIR}) + } + + # Qt DLLs + QT_DLLS = \ + Qt5Core$${DS}.dll \ + Qt5Network$${DS}.dll + + for(dll, QT_DLLS) { + addCopyFileTarget($${dll},$$[QT_INSTALL_BINS],$${SIM_DIR}) + } + + # MinGW DLLs + #MINGW_DLLS = \ + # libgcc_s_dw2-1.dll \ + # mingwm10.dll + #for(dll, MINGW_DLLS) { + # addCopyFileTarget($${dll},$$(QTMINGW),$${SIM_DIR}) + #} +} diff --git a/ground/gcs/src/plugins/hitl/aerosimrc/src/plugin.pro b/ground/gcs/src/plugins/hitl/aerosimrc/src/plugin.pro index d9016bea8..9d292abeb 100644 --- a/ground/gcs/src/plugins/hitl/aerosimrc/src/plugin.pro +++ b/ground/gcs/src/plugins/hitl/aerosimrc/src/plugin.pro @@ -1,15 +1,15 @@ +TEMPLATE = lib +TARGET = plugin_AeroSIMRC + +QT += network +QT -= gui + !win32 { error("AeroSimRC plugin is only available for win32 platform") } include(../../../../../gcs.pri) -QT += network -QT -= gui - -TEMPLATE = lib -TARGET = plugin_AeroSIMRC - RES_DIR = $${PWD}/resources SIM_DIR = $$GCS_BUILD_TREE/misc/AeroSIM-RC PLUGIN_DIR = $$SIM_DIR/Plugin/CopterControl @@ -30,37 +30,4 @@ SOURCES = \ settings.cpp # Resemble the AeroSimRC directory structure and copy plugin files and resources -equals(copydata, 1) { - - # Windows release only - win32:CONFIG(release, debug|release) { - - # resources and sample configuration - PLUGIN_RESOURCES = \ - cc_off.tga \ - cc_off_hover.tga \ - cc_on.tga \ - cc_on_hover.tga \ - cc_plugin.ini \ - plugin.txt - for(res, PLUGIN_RESOURCES) { - addCopyFileTarget($${res},$${RES_DIR},$${PLUGIN_DIR}) - } - - # Qt DLLs - QT_DLLS = \ - Qt5Core.dll \ - Qt5Network.dll - for(dll, QT_DLLS) { - addCopyFileTarget($${dll},$$[QT_INSTALL_BINS],$${SIM_DIR}) - } - - # MinGW DLLs - #MINGW_DLLS = \ - # libgcc_s_dw2-1.dll \ - # mingwm10.dll - #for(dll, MINGW_DLLS) { - # addCopyFileTarget($${dll},$$(QTMINGW),$${SIM_DIR}) - #} - } -} +equals(copydata, 1):include(copydata.pro)