summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomasz Olszak <olszak.tomasz@gmail.com>2015-02-26 15:41:35 +0100
committerTomasz Olszak <olszak.tomasz@gmail.com>2015-02-26 15:41:35 +0100
commitf92494471b41bdbe66532ed5837e1e825671a3a7 (patch)
tree92f1327507a1864a36489cccba1b06b01f9470cd
parentb756e6e57882751e130950ef838149ebfcd11e2d (diff)
downloadqtbase-f92494471b41bdbe66532ed5837e1e825671a3a7.tar.gz
qtbase-f92494471b41bdbe66532ed5837e1e825671a3a7.tar.bz2
qtbase-f92494471b41bdbe66532ed5837e1e825671a3a7.zip
Added handling of Tizen 2.3 Mobile cross-compilation and deployment.
Mkspec and configure refactored similar to Android. Change-Id: I311af56ca9060d933905b876975e83113c685270 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
-rwxr-xr-xconfigure9
-rw-r--r--mkspecs/devices/common/linux_tizen_device_pre.conf41
2 files changed, 45 insertions, 5 deletions
diff --git a/configure b/configure
index e877e08978..ab4298fa00 100755
--- a/configure
+++ b/configure
@@ -710,6 +710,7 @@ XPLATFORM_IOS=no # Whether target platform is iOS
XPLATFORM_ANDROID=no
XPLATFORM_MINGW=no # Whether target platform is MinGW (win32-g++*)
XPLATFORM_QNX=no
+XPLATFORM_TIZEN=no
PLATFORM=$QMAKESPEC
QT_CROSS_COMPILE=no
OPT_CONFIRM_LICENSE=no
@@ -2789,6 +2790,9 @@ case "$XPLATFORM" in
*android-g++*)
XPLATFORM_ANDROID=yes
;;
+ *tizen*)
+ XPLATFORM_TIZEN=yes
+ ;;
esac
#-------------------------------------------------------------------------------
@@ -3229,6 +3233,11 @@ if [ -n "$CFG_SYSROOT" ] && [ "$CFG_GCC_SYSROOT" = "yes" ]; then
else
SYSROOT_FLAG=
fi
+
+if [ "$XPLATFORM_TIZEN" = "yes" -a -n "$TIZEN_SYSROOT" ]; then
+ SYSROOT_FLAG="--sysroot=$TIZEN_SYSROOT"
+fi
+
export SYSROOT_FLAG # used by config.tests/unix/{compile.test,arch.test}
# auto-detect precompiled header support
diff --git a/mkspecs/devices/common/linux_tizen_device_pre.conf b/mkspecs/devices/common/linux_tizen_device_pre.conf
index 2b2c73fb0a..e3f0ffff22 100644
--- a/mkspecs/devices/common/linux_tizen_device_pre.conf
+++ b/mkspecs/devices/common/linux_tizen_device_pre.conf
@@ -1,13 +1,44 @@
#tizen common mkspec
-include(linux_device_pre.conf)
+TIZEN_SDK_ROOT = $$(TIZEN_SDK_ROOT)
+TIZEN_TOOLCHAIN_PREFIX = $$(TIZEN_TOOLCHAIN_PREFIX)
+TIZEN_TOOLCHAIN_VERSION = $$(TIZEN_TOOLCHAIN_VERSION)
+TIZEN_SYSROOT = $$(TIZEN_SYSROOT)
+
+!isEmpty(TIZEN_SDK_ROOT):!isEmpty(TIZEN_TOOLCHAIN_PREFIX):!isEmpty(TIZEN_TOOLCHAIN_VERSION) {
+
+ isEmpty(TIZEN_SYSROOT): error("Tizen Compiler defined but no Tizen sysroot defined. Please define Tizen sysroot in TIZEN_SYSROOT env variable")
-!isEmpty(CROSS_COMPILE) {
- QMAKE_INCDIR = $$[QT_SYSROOT]/usr/include
- QMAKE_LIBDIR = $$[QT_SYSROOT]/lib
- QMAKE_LIBDIR += $$[QT_SYSROOT]/usr/lib
+ CROSS_COMPILE = $$TIZEN_SDK_ROOT/tools/$$TIZEN_TOOLCHAIN_PREFIX-gcc-$$TIZEN_TOOLCHAIN_VERSION/bin/$$TIZEN_TOOLCHAIN_PREFIX-
}
+include(linux_device_pre.conf)
+
+!isEmpty(TIZEN_SDK_ROOT):!isEmpty(TIZEN_TOOLCHAIN_PREFIX):!isEmpty(TIZEN_TOOLCHAIN_VERSION) {
+
+ # modifications to parameters set by linux_device_pre.conf
+ QMAKE_LFLAGS += --sysroot=$$TIZEN_SYSROOT
+ QMAKE_CFLAGS += --sysroot=$$TIZEN_SYSROOT
+ QMAKE_CXXFLAGS += --sysroot=$$TIZEN_SYSROOT
+
+ # TIZEN_ADDITIONAL_INCLUDES and TIZEN_ADDITIONAL_LIBS may be undefined
+ QMAKE_INCDIR += \
+ $$TIZEN_SYSROOT/usr/include \
+ $$TIZEN_SYSROOT/usr/include/dbus-1.0 \
+ $$TIZEN_SYSROOT/usr/include/fontconfig \
+ $$TIZEN_SYSROOT/usr/include/freetype2 \
+ $$TIZEN_SYSROOT/usr/include/appfw \
+ $$TIZEN_SYSROOT/usr/lib/dbus-1.0/include \
+ $$TIZEN_SYSROOT/usr/include/appfw \
+ $$TIZEN_SYSROOT/usr/include/system \
+ $$TIZEN_SYSROOT/usr/include/dlog \
+ $$TIZEN_ADDITIONAL_INCLUDES
+
+ QMAKE_LIBDIR += \
+ $$TIZEN_SYSROOT/lib \
+ $$TIZEN_SYSROOT/usr/lib \
+ $$TIZEN_ADDITIONAL_LIBS
+}
QMAKE_PLATFORM = tizen $$QMAKE_PLATFORM
DEFINES += Q_OS_LINUX_TIZEN \ No newline at end of file