Skip to content

Commit

Permalink
Remove build cruft from qgc, and link static to libuvc for linux
Browse files Browse the repository at this point in the history
  • Loading branch information
kekiefer committed Dec 18, 2016
1 parent 22af870 commit e736014
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 51 deletions.
3 changes: 2 additions & 1 deletion GetThermal.pro
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.7

win32:CONFIG(release, debug|release): LIBS += -L$$PWD/libuvc/build/release/ -luvc
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/libuvc/build/debug/ -luvc
else:unix: LIBS += -L$$PWD/libuvc/build/ -luvc
else:macos: LIBS += -L$$PWD/libuvc/build/ -luvc
else:unix: LIBS += -L$$PWD/libuvc/build/ -luvcstatic

INCLUDEPATH += $$PWD/lepton_sdk/Inc \
$$PWD/libuvc/build/include \
Expand Down
4 changes: 0 additions & 4 deletions common.pri
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ exists ($$PWD/.git) {
}

DEFINES += GIT_VERSION=\"\\\"$$GIT_VERSION\\\"\"
DEFINES += EIGEN_MPL2_ONLY

# Installer configuration

Expand Down Expand Up @@ -176,9 +175,6 @@ BASEDIR = $$IN_PWD

LANGUAGE = C++

LOCATION_PLUGIN_DESTDIR = $${OUT_PWD}/src/QtLocationPlugin
LOCATION_PLUGIN_NAME = QGeoServiceProviderFactoryQGC

# Turn off serial port warnings
DEFINES += _TTY_NOWARN_

Expand Down
27 changes: 7 additions & 20 deletions installer.pri
Original file line number Diff line number Diff line change
Expand Up @@ -10,35 +10,22 @@
installer {
DEFINES += QGC_INSTALL_RELEASE
MacBuild {
VideoEnabled {
# Install the gstreamer framework
# This will:
# Copy from the original distibution into DESTDIR/gstwork (if not already there)
# Prune the framework, removing stuff we don't need
# Relocate all dylibs so they can work under @executable_path/...
# Copy the result into the app bundle
# Make sure qgroundcontrol can find them
message("Preparing GStreamer Framework")
QMAKE_POST_LINK += && $$BASEDIR/tools/prepare_gstreamer_framework.sh $${OUT_PWD}/gstwork/ $${DESTDIR}/$${TARGET}.app $${TARGET}
} else {
message("Skipping GStreamer Framework")
}
# We cd to release directory so we can run macdeployqt without a path to the
# qgroundcontrol.app file. If you specify a path to the .app file the symbolic
# GetThermal.app file. If you specify a path to the .app file the symbolic
# links to plugins will not be created correctly.
QMAKE_POST_LINK += && mkdir -p $${DESTDIR}/package
QMAKE_POST_LINK += && cd $${DESTDIR} && $$dirname(QMAKE_QMAKE)/macdeployqt GetThermal.app -appstore-compliant -verbose=2 -qmldir=$${BASEDIR}/src
QMAKE_POST_LINK += && cd $${DESTDIR} && $$dirname(QMAKE_QMAKE)/macdeployqt GetThermal.app -appstore-compliant -verbose=2 -qmldir=$${BASEDIR}/qml
QMAKE_POST_LINK += && cd $${OUT_PWD}
QMAKE_POST_LINK += && hdiutil create -verbose -stretch 3g -layout SPUD -srcfolder $${DESTDIR}/GetThermal.app -volname GetThermal $${DESTDIR}/package/GetThermal.dmg
}
WindowsBuild {
# The pdb moving command are commented out for now since we are including the .pdb in the installer. This makes it much
# easier to debug user crashes.
#QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY $${DESTDIR_WIN}\\qgroundcontrol.pdb
#QMAKE_POST_LINK += $$escape_expand(\\n) del $${DESTDIR_WIN}\\qgroundcontrol.pdb
QMAKE_POST_LINK += $$escape_expand(\\n) cd $$BASEDIR_WIN && $$quote("\"C:\\Program Files \(x86\)\\NSIS\\makensis.exe\"" /NOCD "\"/XOutFile $${DESTDIR_WIN}\\GetThermal-installer.exe\"" "$$BASEDIR_WIN\\deploy\\qgroundcontrol_installer.nsi")
#QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY qgroundcontrol.pdb $${DESTDIR_WIN}
#QMAKE_POST_LINK += $$escape_expand(\\n) del qgroundcontrol.pdb
#QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY $${DESTDIR_WIN}\\getthermal.pdb
#QMAKE_POST_LINK += $$escape_expand(\\n) del $${DESTDIR_WIN}\\getthermal.pdb
QMAKE_POST_LINK += $$escape_expand(\\n) cd $$BASEDIR_WIN && $$quote("\"C:\\Program Files \(x86\)\\NSIS\\makensis.exe\"" /NOCD "\"/XOutFile $${DESTDIR_WIN}\\GetThermal-installer.exe\"" "$$BASEDIR_WIN\\deploy\\getthermal_installer.nsi")
#QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY getthermal.pdb $${DESTDIR_WIN}
#QMAKE_POST_LINK += $$escape_expand(\\n) del getthermal.pdb
OTHER_FILES += deploy/qgroundcontrol_installer.nsi
}
LinuxBuild {
Expand Down
2 changes: 1 addition & 1 deletion libuvc
Submodule libuvc updated 1 files
+2 −7 CMakeLists.txt
26 changes: 1 addition & 25 deletions setup.pri
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,6 @@ MacBuild {
DESTDIR_COPY_RESOURCE_LIST = $$DESTDIR/$${TARGET}.app/Contents/MacOS
}

# Windows version of QMAKE_COPY_DIR of course doesn't work the same as Mac/Linux. It will only
# copy the contents of the source directory. It doesn't create the top level source directory
# in the target.
WindowsBuild {
# Make sure to keep both side of this if using the same set of directories
DESTDIR_COPY_RESOURCE_LIST = $$replace(DESTDIR,"/","\\")
BASEDIR_COPY_RESOURCE_LIST = $$replace(BASEDIR,"/","\\")
QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY_DIR \"$$BASEDIR_COPY_RESOURCE_LIST\\resources\\flightgear\" \"$$DESTDIR_COPY_RESOURCE_LIST\\flightgear\"
} else {
!MobileBuild {
# Make sure to keep both sides of this if using the same set of directories
#QMAKE_POST_LINK += && $$QMAKE_COPY_DIR $$BASEDIR/resources/flightgear $$DESTDIR_COPY_RESOURCE_LIST
}
}

#
# Perform platform specific setup
#
Expand All @@ -49,8 +34,6 @@ iOSBuild | MacBuild {
MacBuild {
# Copy non-standard frameworks into app package
QMAKE_POST_LINK += && rsync -a --delete $$BASEDIR/libuvc/build/*.dylib $$DESTDIR/$${TARGET}.app/Contents/
# SDL2 Framework
#QMAKE_POST_LINK += && install_name_tool -change "@rpath/SDL2.framework/Versions/A/SDL2" "@executable_path/../Frameworks/SDL2.framework/Versions/A/SDL2" $$DESTDIR/$${TARGET}.app/Contents/MacOS/$${TARGET}
}

WindowsBuild {
Expand Down Expand Up @@ -106,18 +89,12 @@ LinuxBuild {
libQt5Gui.so.5 \
libQt5Multimedia.so.5 \
libQt5MultimediaQuick_p.so.5 \
libQt5Network.so.5 \
libQt5OpenGL.so.5 \
libQt5Positioning.so.5 \
libQt5PrintSupport.so.5 \
libQt5Qml.so.5 \
libQt5Quick.so.5 \
libQt5QuickControls2.so.5 \
libQt5QuickTemplates2.so.5 \
libQt5QuickWidgets.so.5 \
libQt5SerialPort.so.5 \
libQt5Svg.so.5 \
libQt5Test.so.5 \
libQt5XcbQpa.so.5

!contains(DEFINES, __rasp_pi2__) {
Expand All @@ -137,8 +114,7 @@ LinuxBuild {
iconengines \
imageformats \
platforminputcontexts \
platforms \
position
platforms

!contains(DEFINES, __rasp_pi2__) {
QT_PLUGIN_LIST += xcbglintegrations
Expand Down

0 comments on commit e736014

Please sign in to comment.