Commit dd8a2dab authored by dogmaphobic's avatar dogmaphobic
Browse files

Fix iOS Build.

parent 045e3f5a
......@@ -19,8 +19,9 @@
include(QGCCommon.pri)
TARGET = qgroundcontrol
TARGET = qgroundcontrol
TEMPLATE = app
DESTDIR = $${OUT_PWD}/build
# Load additional config flags from user_config.pri
exists(user_config.pri):infile(user_config.pri, CONFIG) {
......@@ -34,13 +35,9 @@ LinuxBuild {
# QGC QtLocation plugin
LIBS += -L$${LOCATION_PLUGIN_DESTDIR}
LIBS += -l$${LOCATION_PLUGIN_NAME}
WindowsBuild {
PRE_TARGETDEPS += $${LOCATION_PLUGIN_DESTDIR}/$${LOCATION_PLUGIN_NAME}.lib
} else {
PRE_TARGETDEPS += $${LOCATION_PLUGIN_DESTDIR}/lib$${LOCATION_PLUGIN_NAME}.a
!ios {
LIBS += -L$${LOCATION_PLUGIN_DESTDIR}
LIBS += -l$${LOCATION_PLUGIN_NAME}
}
# Qt configuration
......@@ -88,8 +85,12 @@ MacBuild {
iOSBuild {
QMAKE_INFO_PLIST = $${BASEDIR}/ios/iOS-Info.plist
ICON = $${BASEDIR}/resources/icons/macx.icns
OTHER_FILES += $${BASEDIR}/iOS-Info.plist
OTHER_FILES += $${BASEDIR}/ios/iOS-Info.plist
ios_icon.files = $$files($$PWD/ios/AppIcon*.png)
QMAKE_BUNDLE_DATA += ios_icon
app_launch_images.files = $$PWD/ios/LaunchScreen.xib
QMAKE_BUNDLE_DATA += app_launch_images
#-- TODO: Add iTunesArtwork
}
LinuxBuild {
......@@ -278,7 +279,6 @@ WindowsBuild {
HEADERS += src/stable_headers.h
}
!iOSBuild {
HEADERS += \
src/comm/SerialLink.h \
......
......@@ -30,10 +30,13 @@ linux {
linux-g++ | linux-g++-64 {
message("Linux build")
CONFIG += LinuxBuild
DEFINES += __STDC_LIMIT_MACROS
} else : android-g++ {
message("Android build")
CONFIG += AndroidBuild MobileBuild
DEFINES += __android__
DEFINES += __STDC_LIMIT_MACROS
target.path = $$DESTDIR
warning("Android build is experimental and not fully functional")
} else {
error("Unsuported Linux toolchain, only GCC 32- or 64-bit is supported")
......@@ -42,6 +45,7 @@ linux {
win32-msvc2010 | win32-msvc2012 | win32-msvc2013 {
message("Windows build")
CONFIG += WindowsBuild
DEFINES += __STDC_LIMIT_MACROS
} else {
error("Unsupported Windows toolchain, only Visual Studio 2010, 2012, and 2013 are supported")
}
......@@ -49,6 +53,10 @@ linux {
macx-clang | macx-llvm {
message("Mac build")
CONFIG += MacBuild
CONFIG += x86_64
CONFIG -= x86
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.6
QMAKE_MAC_SDK = macosx10.11
QMAKE_CXXFLAGS += -fvisibility=hidden
} else {
error("Unsupported Mac toolchain, only 64-bit LLVM+clang is supported")
......@@ -60,6 +68,9 @@ linux {
message("iOS build")
CONFIG += iOSBuild MobileBuild app_bundle
DEFINES += __ios__
QMAKE_IOS_DEPLOYMENT_TARGET = 8.0
QMAKE_IOS_TARGETED_DEVICE_FAMILY = 2 #- iPad only for now
QMAKE_LFLAGS += -Wl,-no_pie
warning("iOS build is experimental and not yet fully functional")
} else {
error("Unsupported build platform, only Linux, Windows, Android and Mac (Mac OS and iOS) are supported")
......@@ -109,76 +120,22 @@ win32:debug_and_release {
# Setup our build directories
BASEDIR = $$IN_PWD
DESTDIR = $${OUT_PWD}/debug
BUILDDIR = $${OUT_PWD}/build-debug
ReleaseBuild {
DESTDIR = $${OUT_PWD}/release
BUILDDIR = $${OUT_PWD}/build-release
}
iOSBuild {
# For whatever reason, the iOS build fails with these set. Some files have the full,
# properly concatenaded path and file name while others have only the second portion,
# as if BUILDDIR was empty.
OBJECTS_DIR = $$(HOME)/tmp/qgcfoo
MOC_DIR = $$(HOME)/tmp/qgcfoo
UI_DIR = $$(HOME)/tmp/qgcfoo
RCC_DIR = $$(HOME)/tmp/qgcfoo
} else {
OBJECTS_DIR = $${BUILDDIR}/obj
MOC_DIR = $${BUILDDIR}/moc
UI_DIR = $${BUILDDIR}/ui
RCC_DIR = $${BUILDDIR}/rcc
!ios {
OBJECTS_DIR = $${OUT_PWD}/obj
MOC_DIR = $${OUT_PWD}/moc
UI_DIR = $${OUT_PWD}/ui
RCC_DIR = $${OUT_PWD}/rcc
}
LANGUAGE = C++
AndroidBuild {
target.path = $$DESTDIR
}
# We place the created plugin lib into the objects dir so that make clean will clean it as well
iOSBuild {
LOCATION_PLUGIN_DESTDIR = $$(HOME)/tmp/qgcfoo
} else {
LOCATION_PLUGIN_DESTDIR = $$OBJECTS_DIR
}
LOCATION_PLUGIN_NAME = QGeoServiceProviderFactoryQGC
message(BASEDIR $$BASEDIR DESTDIR $$DESTDIR TARGET $$TARGET OUTPUT $$OUT_PWD)
LOCATION_PLUGIN_DESTDIR = $${OUT_PWD}/src/QtLocationPlugin
LOCATION_PLUGIN_NAME = QGeoServiceProviderFactoryQGC
# Turn off serial port warnings
DEFINES += _TTY_NOWARN_
#
# OS Specific settings
#
AndroidBuild {
DEFINES += __STDC_LIMIT_MACROS
}
iOSBuild {
QMAKE_IOS_DEPLOYMENT_TARGET = 7.0
}
MacBuild {
CONFIG += x86_64
CONFIG -= x86
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.6
QMAKE_MAC_SDK = macosx10.11
}
LinuxBuild {
DEFINES += __STDC_LIMIT_MACROS
}
WindowsBuild {
DEFINES += __STDC_LIMIT_MACROS
}
#
# By default warnings as errors are turned off. Even so, in order for a pull request
# to be accepted you must compile cleanly with warnings as errors turned on the default
......
include(QGCCommon.pri)
TEMPLATE = lib
TARGET = QGeoServiceProviderFactoryQGC
CONFIG += plugin static
QT += location-private positioning-private network
PLUGIN_TYPE = geoservices
DESTDIR = $${LOCATION_PLUGIN_DESTDIR}
contains(QT_VERSION, 5.5.1) {
message(Using Local QtLocation headers for Qt 5.5.1)
INCLUDEPATH += \
libs/qtlocation/include \
} else {
message(Using Default QtLocation headers)
INCLUDEPATH += $$QT.location.includes
}
HEADERS += \
src/QtLocationPlugin/qgeoserviceproviderpluginqgc.h \
src/QtLocationPlugin/qgeotiledmappingmanagerengineqgc.h \
src/QtLocationPlugin/qgeotilefetcherqgc.h \
src/QtLocationPlugin/qgeomapreplyqgc.h \
src/QtLocationPlugin/qgeocodingmanagerengineqgc.h \
src/QtLocationPlugin/qgeocodereplyqgc.h \
src/QtLocationPlugin/OpenPilotMaps.h
SOURCES += \
src/QtLocationPlugin/qgeoserviceproviderpluginqgc.cpp \
src/QtLocationPlugin/qgeotiledmappingmanagerengineqgc.cpp \
src/QtLocationPlugin/qgeotilefetcherqgc.cpp \
src/QtLocationPlugin/qgeomapreplyqgc.cpp \
src/QtLocationPlugin/qgeocodingmanagerengineqgc.cpp \
src/QtLocationPlugin/qgeocodereplyqgc.cpp \
src/QtLocationPlugin/OpenPilotMaps.cc
OTHER_FILES += \
src/QtLocationPlugin/qgc_maps_plugin.json
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9059" systemVersion="14F1021" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9049"/>
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view contentMode="scaleToFill" id="iN0-l3-epB">
<rect key="frame" x="0.0" y="0.0" width="480" height="480"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="8ie-xW-0ye">
<rect key="frame" x="20" y="439" width="441" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
<variation key="widthClass=compact">
<fontDescription key="fontDescription" type="system" pointSize="11"/>
</variation>
</label>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="QGroundControl" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="kId-c2-rCX">
<rect key="frame" x="20" y="140" width="441" height="43"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="36"/>
<color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<color key="highlightedColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</label>
</subviews>
<color key="backgroundColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="kId-c2-rCX" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="bottom" multiplier="1/3" constant="1" id="Kid-kn-2rF"/>
<constraint firstAttribute="centerX" secondItem="kId-c2-rCX" secondAttribute="centerX" id="Koa-jz-hwk"/>
<constraint firstAttribute="bottom" secondItem="8ie-xW-0ye" secondAttribute="bottom" constant="20" id="Kzo-t9-V3l"/>
<constraint firstItem="8ie-xW-0ye" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="MfP-vx-nX0"/>
<constraint firstAttribute="centerX" secondItem="8ie-xW-0ye" secondAttribute="centerX" id="ZEH-qu-HZ9"/>
<constraint firstItem="kId-c2-rCX" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="fvb-Df-36g"/>
</constraints>
<nil key="simulatedStatusBarMetrics"/>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<point key="canvasLocation" x="404" y="445"/>
</view>
</objects>
</document>
Supports Markdown
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