Commit 42f51027 authored by Don Gagne's avatar Don Gagne

parent 4e765ad9
......@@ -114,7 +114,7 @@ linux {
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.6
}
#-- Not forcing anything. Let qmake find the latest, installed SDK.
QMAKE_MAC_SDK = macosx10.15
#QMAKE_MAC_SDK = macosx10.15
QMAKE_CXXFLAGS += -fvisibility=hidden
QMAKE_CXXFLAGS_WARN_ON += -Werror \
-Wno-unused-parameter # gst-plugins-good
......@@ -154,6 +154,11 @@ linux|macx|ios {
}
}
!MacBuild {
# See QGCPostLinkCommon.pri for details on why MacBuild doesn't set DESTDIR
DESTDIR = staging
}
MobileBuild {
DEFINES += __mobile__
}
......
......@@ -14,19 +14,32 @@
#
MacBuild {
QMAKE_POST_LINK += echo "Post Link Common"
# Qt is screwed up if you use qmake to create an XCode Project which has a DESTDIR set on it.
# This is because XCode builds create the .app in BUILT_PRODUCTS_DIR. If you use a DESTDIR then
# Qt adds a Copy Phase to the build which copies the .app from the BUILT_PRODUCTS_DIR to DESTDIR.
# This causes all sort of problem which are too long to list here. In order to work around this
# We have to duplicate the post link commands here to work from two different locations. And to deal
# with the differences between post list command running in a shell script (XCode) versus a makefile (Qt Creator)
macx-xcode {
# XCode Project builds create the .app in BUILT_PRODUCTS_DIR. Copy it to the normal location for QtCreator builds.
QMAKE_POST_LINK += cp -r $BUILT_PRODUCTS_DIR/$${TARGET}.app .
}
# Copy non-standard frameworks into app package
QMAKE_POST_LINK += rsync -a --delete $$BASEDIR/libs/Frameworks $${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" $${TARGET}.app/Contents/MacOS/$${TARGET}
# AirMap
contains (DEFINES, QGC_AIRMAP_ENABLED) {
QMAKE_POST_LINK += && rsync -a $$BASEDIR/libs/airmapd/macOS/$$AIRMAP_QT_PATH/* $${TARGET}.app/Contents/Frameworks/
QMAKE_POST_LINK += && install_name_tool -change "@rpath/libairmap-qt.0.0.1.dylib" "@executable_path/../Frameworks/libairmap-qt.0.0.1.dylib" $${TARGET}.app/Contents/MacOS/$${TARGET}
# SDL2 Framework
QMAKE_POST_LINK += && rsync -a --delete $$BASEDIR/libs/Frameworks/SDL2.Framework $BUILT_PRODUCTS_DIR/$${TARGET}.app/Contents/Frameworks
QMAKE_POST_LINK += && install_name_tool -change "@rpath/SDL2.framework/Versions/A/SDL2" "@executable_path/../Frameworks/SDL2.framework/Versions/A/SDL2" $BUILT_PRODUCTS_DIR/$${TARGET}.app/Contents/MacOS/$${TARGET}
# AirMap
contains (DEFINES, QGC_AIRMAP_ENABLED) {
QMAKE_POST_LINK += && rsync -a $$BASEDIR/libs/airmapd/macOS/$$AIRMAP_QT_PATH/* $BUILT_PRODUCTS_DIR/$${TARGET}.app/Contents/Frameworks/
QMAKE_POST_LINK += && install_name_tool -change "@rpath/libairmap-qt.0.0.1.dylib" "@executable_path/../Frameworks/libairmap-qt.0.0.1.dylib" $BUILT_PRODUCTS_DIR/$${TARGET}.app/Contents/MacOS/$${TARGET}
}
} else {
# SDL2 Framework
QMAKE_POST_LINK += && rsync -a --delete $$BASEDIR/libs/Frameworks/SDL2.Framework $${TARGET}.app/Contents/Frameworks
QMAKE_POST_LINK += && install_name_tool -change "@rpath/SDL2.framework/Versions/A/SDL2" "@executable_path/../Frameworks/SDL2.framework/Versions/A/SDL2" $${TARGET}.app/Contents/MacOS/$${TARGET}
# AirMap
contains (DEFINES, QGC_AIRMAP_ENABLED) {
QMAKE_POST_LINK += && rsync -a $$BASEDIR/libs/airmapd/macOS/$$AIRMAP_QT_PATH/* $${TARGET}.app/Contents/Frameworks/
QMAKE_POST_LINK += && install_name_tool -change "@rpath/libairmap-qt.0.0.1.dylib" "@executable_path/../Frameworks/libairmap-qt.0.0.1.dylib" $${TARGET}.app/Contents/MacOS/$${TARGET}
}
}
}
......
......@@ -12,6 +12,7 @@
installer {
DEFINES += QGC_INSTALL_RELEASE
MacBuild {
#QMAKE_POST_LINK += && rsync -a --delete $BUILT_PRODUCTS_DIR/$${TARGET}.app .
VideoEnabled {
# Install the gstreamer framework
# This will:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment