summaryrefslogtreecommitdiffstats
path: root/qt5-layer/recipes-qt/qt5/qtbase_5.0.2.bbappend
diff options
context:
space:
mode:
Diffstat (limited to 'qt5-layer/recipes-qt/qt5/qtbase_5.0.2.bbappend')
-rw-r--r--qt5-layer/recipes-qt/qt5/qtbase_5.0.2.bbappend74
1 files changed, 74 insertions, 0 deletions
diff --git a/qt5-layer/recipes-qt/qt5/qtbase_5.0.2.bbappend b/qt5-layer/recipes-qt/qt5/qtbase_5.0.2.bbappend
new file mode 100644
index 0000000..33f0e8b
--- /dev/null
+++ b/qt5-layer/recipes-qt/qt5/qtbase_5.0.2.bbappend
@@ -0,0 +1,74 @@
1# Copyright (C) 2013 Eric Bénard - Eukréa Electromatique
2
3HAS_X11 = "${@base_contains('DISTRO_FEATURES', 'x11', 1, 0, d)}"
4
5GL_DEPENDS_mx6 = "${@base_contains('DISTRO_FEATURES', 'x11', '', 'virtual/libgles2 virtual/egl', d)}"
6QT_GLFLAGS_mx6 = "${@base_contains('DISTRO_FEATURES', 'x11', '', '-opengl es2 -eglfs', d)}"
7QT_EXAMPLES_mx6 = "-make examples"
8QT_DEMOS_mx6 = "-make demos"
9
10GL_DEPENDS_mx5 = "${@base_contains('DISTRO_FEATURES', 'x11', '', 'virtual/libgles2 virtual/egl', d)}"
11QT_GLFLAGS_mx5 = "${@base_contains('DISTRO_FEATURES', 'x11', '', '-opengl es2 -eglfs', d)}"
12QT_EXAMPLES_mx5 = "-make examples"
13QT_DEMOS_mx5 = "-make demos"
14
15TSLIB_DEPENDS_mx6 = "tslib"
16QT_TSLIB_mx6 = "-tslib"
17
18TSLIB_DEPENDS_mx5 = "tslib"
19QT_TSLIB_mx5 = "-tslib"
20
21PACKAGE_ARCH_mx6 = "${MACHINE_ARCH}"
22PACKAGE_ARCH_mx5 = "${MACHINE_ARCH}"
23
24FILESEXTRAPATHS_prepend_mx5 := "${THISDIR}/${PN}:"
25SRC_URI_append_mx5 += " \
26 file://qeglfshooks_imx5.cpp \
27 "
28
29do_configure_prepend_mx6() {
30 if test ${HAS_X11} -eq 0; then
31# adapt qmake.conf to our needs
32sed -i 's!load(qt_config)!!' ${S}/mkspecs/linux-oe-g++/qmake.conf
33cat >> ${S}/mkspecs/linux-oe-g++/qmake.conf <<EOF
34EGLFS_PLATFORM_HOOKS_SOURCES = \$\$PWD/qeglfshooks_imx6.cpp
35IMX6_CFLAGS = -DLINUX=1 -DEGL_API_FB=1
36QMAKE_LIBS_EGL += -lEGL
37QMAKE_LIBS_OPENGL_ES2 += -lGLESv2 -lEGL -lGAL
38QMAKE_LIBS_OPENVG += -lOpenVG -lEGL -lGAL
39QMAKE_CFLAGS_RELEASE += \$\$IMX6_CFLAGS
40QMAKE_CXXFLAGS_RELEASE += \$\$IMX6_CFLAGS
41QMAKE_CFLAGS_DEBUG += \$\$IMX6_CFLAGS
42QMAKE_CXXFLAGS_DEBUG += \$\$IMX6_CFLAGS
43QMAKE_CFLAGS_EGL += \$\$IMX6_CFLAGS
44load(qt_config)
45
46EOF
47
48# copy the hook in the mkspecs directory OE is using
49cp ${S}/mkspecs/devices/linux-imx6-g++/qeglfshooks_imx6.cpp ${S}/mkspecs/linux-oe-g++/
50 fi
51}
52
53do_configure_prepend_mx5() {
54 if test ${HAS_X11} -eq 0; then
55# adapt qmake.conf to our needs
56sed -i 's!load(qt_config)!!' ${S}/mkspecs/linux-oe-g++/qmake.conf
57cat >> ${S}/mkspecs/linux-oe-g++/qmake.conf <<EOF
58EGLFS_PLATFORM_HOOKS_SOURCES = \$\$PWD/qeglfshooks_imx5.cpp
59IMX5_CFLAGS = -D_LINUX
60QMAKE_LIBS_EGL += -lEGL
61QMAKE_LIBS_OPENGL_ES2 += -lGLESv2 -lEGL
62QMAKE_LIBS_OPENVG += -lOpenVG -lEGL
63QMAKE_CFLAGS_RELEASE += \$\$IMX5_CFLAGS
64QMAKE_CXXFLAGS_RELEASE += \$\$IMX5_CFLAGS
65QMAKE_CFLAGS_DEBUG += \$\$IMX5_CFLAGS
66QMAKE_CXXFLAGS_DEBUG += \$\$IMX5_CFLAGS
67QMAKE_CFLAGS_EGL += \$\$IMX5_CFLAGS
68load(qt_config)
69
70EOF
71
72cp ${WORKDIR}/qeglfshooks_imx5.cpp ${S}/mkspecs/linux-oe-g++/
73 fi
74}