Added device mkspec for Tizen 2.* mobile cross compilation.
authorTomasz Olszak <olszak.tomasz@gmail.com>
Tue, 10 Nov 2015 14:41:56 +0000 (15:41 +0100)
committerTomasz Olszak <olszak.tomasz@gmail.com>
Tue, 10 Nov 2015 14:41:56 +0000 (15:41 +0100)
Change-Id: I01c42562141906ca7a1f873d9818965434418860
Reviewed-by: Jarosław Staniek <staniek@kde.org>
Reviewed-by: Tomasz Olszak <olszak.tomasz@gmail.com>
mkspecs/devices/linux-g++-tizen-2.x-mobile/qmake.conf [new file with mode: 0644]
mkspecs/devices/linux-g++-tizen-2.x-mobile/qplatformdefs.h [new file with mode: 0644]

diff --git a/mkspecs/devices/linux-g++-tizen-2.x-mobile/qmake.conf b/mkspecs/devices/linux-g++-tizen-2.x-mobile/qmake.conf
new file mode 100644 (file)
index 0000000..78e20bd
--- /dev/null
@@ -0,0 +1,54 @@
+# Tizen spec for Tizen 2.* Mobile,it is used for cross compilation using public
+# rootstrap privided together with Tizen Native API in Tizen SDK.
+# Depending on environment variables make it possible to change Tizen SDK path
+# without rebuilding Qt
+
+include(../../common/linux-g++-tizen.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_SYSROOT) || isEmpty(TIZEN_SDK_ROOT) || isEmpty(TIZEN_TOOLCHAIN_PREFIX) || isEmpty(TIZEN_TOOLCHAIN_VERSION) {
+    error("One of TIZEN_SDK_ROOT, TIZEN_TOOLCHAIN_PREFIX, TIZEN_TOOLCHAIN_VERSION, TIZEN_SYSROOT is not defined. Please define corresponding env variables")
+}
+
+CROSS_COMPILE = $$TIZEN_SDK_ROOT/tools/$$TIZEN_TOOLCHAIN_PREFIX-gcc-$$TIZEN_TOOLCHAIN_VERSION/bin/$$TIZEN_TOOLCHAIN_PREFIX-
+
+# modifications to g++-unix.conf
+QMAKE_CC                = $${CROSS_COMPILE}gcc
+QMAKE_CXX               = $${CROSS_COMPILE}g++
+QMAKE_LINK              = $${QMAKE_CXX}
+QMAKE_LINK_SHLIB        = $${QMAKE_CXX}
+
+# modifications to linux.conf
+QMAKE_AR                = $${CROSS_COMPILE}ar cqs
+QMAKE_OBJCOPY           = $${CROSS_COMPILE}objcopy
+QMAKE_NM                = $${CROSS_COMPILE}nm -P
+QMAKE_STRIP             = $${CROSS_COMPILE}strip
+
+# 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
+
+load(qt_config)
diff --git a/mkspecs/devices/linux-g++-tizen-2.x-mobile/qplatformdefs.h b/mkspecs/devices/linux-g++-tizen-2.x-mobile/qplatformdefs.h
new file mode 100644 (file)
index 0000000..ebd59e2
--- /dev/null
@@ -0,0 +1,34 @@
+/****************************************************************************
+**
+** Copyright (©) 2015  Tomasz Olszak <olszak.tomasz@gmail.com>
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL21$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "../../linux-g++/qplatformdefs.h"