From 6f87a493623e7ef70bd43f2eac235c36a455c5e5 Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Tue, 26 Jan 2016 14:31:26 +0200 Subject: Move qt5 sdk creation bits to new bbclass Change-Id: I6d00c21fa04e77db60c7c48ad6ba10eacad00b42 Reviewed-by: David Schulz Reviewed-by: Teemu Holappa --- classes/populate_b2qt_qt5_sdk.bbclass | 61 +++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 classes/populate_b2qt_qt5_sdk.bbclass (limited to 'classes') diff --git a/classes/populate_b2qt_qt5_sdk.bbclass b/classes/populate_b2qt_qt5_sdk.bbclass new file mode 100644 index 0000000..78ad457 --- /dev/null +++ b/classes/populate_b2qt_qt5_sdk.bbclass @@ -0,0 +1,61 @@ +############################################################################# +## +## Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). +## +## This file is part of the Qt Enterprise Embedded Scripts of the Qt +## framework. +## +## $QT_BEGIN_LICENSE$ +## Commercial License Usage Only +## Licensees holding valid commercial Qt license agreements with Digia +## with an appropriate addendum covering the Qt Enterprise Embedded Scripts, +## may use this file in accordance with the terms contained in said license +## agreement. +## +## For further information use the contact form at +## http://www.qt.io/contact-us. +## +## +## $QT_END_LICENSE$ +## +############################################################################# + +inherit populate_b2qt_sdk populate_sdk_qt5_base + +SDK_MKSPEC_DIR = "${SDK_OUTPUT}${SDKTARGETSYSROOT}${libdir}/${QT_DIR_NAME}/mkspecs" +SDK_MKSPEC = "devices/linux-oe-generic-g++" +SDK_DEVICE_PRI = "${SDK_MKSPEC_DIR}/qdevice.pri" +SDK_DYNAMIC_FLAGS = "-O. -pipe -g" + +create_sdk_files_append () { + # Create the toolchain user's generic device mkspec + install -d ${SDK_MKSPEC_DIR}/${SDK_MKSPEC} + cat > ${SDK_MKSPEC_DIR}/${SDK_MKSPEC}/qmake.conf < ${SDK_MKSPEC_DIR}/${SDK_MKSPEC}/qplatformdefs.h < ${SDK_DEVICE_PRI} + echo "CROSS_COMPILE = \$\$[QT_HOST_PREFIX]${bindir_nativesdk}/${TARGET_SYS}/${TARGET_PREFIX}" >> ${SDK_DEVICE_PRI} + echo "QMAKE_CFLAGS *= ${TARGET_CC_ARCH} --sysroot=\$\$[QT_SYSROOT] ${static_cflags}" >> ${SDK_DEVICE_PRI} + echo "QMAKE_CXXFLAGS *= ${TARGET_CC_ARCH} --sysroot=\$\$[QT_SYSROOT] ${static_cxxflags}" >> ${SDK_DEVICE_PRI} + echo "QMAKE_LFLAGS *= ${TARGET_CC_ARCH} --sysroot=\$\$[QT_SYSROOT] ${TARGET_LDFLAGS}" >> ${SDK_DEVICE_PRI} + + # Setup qt.conf to point at the device mkspec by default + qtconf=${SDK_OUTPUT}/${SDKPATHNATIVE}${OE_QMAKE_PATH_HOST_BINS}/qt.conf + echo 'HostSpec = linux-g++' >> $qtconf + echo 'TargetSpec = devices/linux-oe-generic-g++' >> $qtconf +} -- cgit v1.2.3-54-g00ecf