qtbase_5.1.1.bbappend 1.68 KB
Newer Older
1 2 3 4
# Copyright (C) 2013 Eric Bénard - Eukréa Electromatique

HAS_X11 = "${@base_contains('DISTRO_FEATURES', 'x11', 1, 0, d)}"

5 6
PACKAGECONFIG_GL_mx5 = "gles2"
PACKAGECONFIG_append_mx5 = " tslib icu examples"
7

8 9
PACKAGECONFIG_GL_mx6 = "gles2"
PACKAGECONFIG_append_mx6 = " tslib icu examples"
10

11 12
do_configure_prepend_mx5() {
    sed -i 's!load(qt_config)!!' ${S}/mkspecs/linux-oe-g++/qmake.conf
13

14 15 16 17 18
    cat >> ${S}/mkspecs/linux-oe-g++/qmake.conf <<EOF
IMX5_CFLAGS             = -D_LINUX=1
QMAKE_LIBS_EGL         += -lEGL
QMAKE_LIBS_OPENGL_ES2  += -lGLESv2 -lEGL
QMAKE_LIBS_OPENVG      += -lOpenVG -lEGL
19

20 21 22 23 24 25 26 27 28
QMAKE_CFLAGS_RELEASE   += \$\$IMX5_CFLAGS
QMAKE_CXXFLAGS_RELEASE += \$\$IMX5_CFLAGS
QMAKE_CFLAGS_DEBUG   += \$\$IMX5_CFLAGS
QMAKE_CXXFLAGS_DEBUG += \$\$IMX5_CFLAGS

load(qt_config)

EOF
}
29 30

do_configure_prepend_mx6() {
31 32
	# adapt qmake.conf to our needs
	sed -i 's!load(qt_config)!!' ${S}/mkspecs/linux-oe-g++/qmake.conf
33
    if test ${HAS_X11} -eq 0; then
34
		cat >> ${S}/mkspecs/linux-oe-g++/qmake.conf <<EOF
35 36
EGLFS_PLATFORM_HOOKS_SOURCES = \$\$PWD/qeglfshooks_imx6.cpp
IMX6_CFLAGS             = -DLINUX=1 -DEGL_API_FB=1
37 38 39 40 41 42 43 44 45
EOF
		# copy the hook in the mkspecs directory OE is using
		cp ${S}/mkspecs/devices/linux-imx6-g++/qeglfshooks_imx6.cpp ${S}/mkspecs/linux-oe-g++/
	else
	cat >> ${S}/mkspecs/linux-oe-g++/qmake.conf <<EOF
IMX6_CFLAGS             = -DLINUX=1
EOF
	fi
	cat >> ${S}/mkspecs/linux-oe-g++/qmake.conf <<EOF
46 47 48 49 50 51 52 53 54 55 56 57
QMAKE_LIBS_EGL         += -lEGL
QMAKE_LIBS_OPENGL_ES2  += -lGLESv2 -lEGL -lGAL
QMAKE_LIBS_OPENVG      += -lOpenVG -lEGL -lGAL
QMAKE_CFLAGS_RELEASE   += \$\$IMX6_CFLAGS
QMAKE_CXXFLAGS_RELEASE += \$\$IMX6_CFLAGS
QMAKE_CFLAGS_DEBUG   += \$\$IMX6_CFLAGS
QMAKE_CXXFLAGS_DEBUG += \$\$IMX6_CFLAGS

load(qt_config)

EOF
}