summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2012-02-28 10:00:32 +0100
committerQt by Nokia <qt-info@nokia.com>2012-04-13 18:15:26 +0200
commit19524b7499c0a4b6f66d4797f04f06e140234149 (patch)
tree6e077c6d3732227df896a418f18082f81bdecc76
parent6fc44c59263a19b6697de980c70e085f0f2922c4 (diff)
directfb: Integrate building into configure.
Add DirectFB buildsystem integration by adding a configure target and adding it as subdirectory to the project file. The default is to automatically build directfb. Update the Broadcom/9425 build. Change-Id: I482f865cebd9d5cd4c98c184773f8534f92db9df Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
-rwxr-xr-xconfigure42
-rw-r--r--mkspecs/devices/linux-mipsel-broadcom-97425-g++/qmake.conf8
-rw-r--r--src/plugins/platforms/directfb/directfb.pro14
-rw-r--r--src/plugins/platforms/platforms.pro4
4 files changed, 50 insertions, 18 deletions
diff --git a/configure b/configure
index 0fd371bdb5..75e59f4c8b 100755
--- a/configure
+++ b/configure
@@ -705,6 +705,7 @@ CFG_XKB=auto
CFG_XCB=auto
CFG_XCB_LIMITED=yes
CFG_EGLFS=auto
+CFG_DIRECTFB=auto
CFG_LIBUDEV=auto
CFG_OBSOLETE_WAYLAND=no
CFG_EVDEV=auto
@@ -891,7 +892,7 @@ while [ "$#" -gt 0 ]; do
VAL=no
;;
#Qt style yes options
- -profile|-shared|-static|-sm|-xinerama|-xshape|-xsync|-xinput|-xinput2|-egl|-reduce-exports|-pch|-separate-debug-info|-stl|-freetype|-xcursor|-xfixes|-xrandr|-xrender|-mitshm|-fontconfig|-xkb|-xcb|-eglfs|-nis|-dbus|-dbus-linked|-glib|-gstreamer|-gtkstyle|-cups|-iconv|-largefile|-h|-help|-v|-verbose|-debug|-release|-fast|-accessibility|-confirm-license|-gnumake|-framework|-debug-and-release|-exceptions|-harfbuzz|-prefix-install|-silent|-optimized-qmake|-dwarf2|-reduce-relocations|-sse|-openssl|-openssl-linked|-phonon-backend|-audio-backend|-qml-debug|-javascript-jit|-rpath|-pkg-config|-force-pkg-config|-icu|-force-asserts|-testcocoon)
+ -profile|-shared|-static|-sm|-xinerama|-xshape|-xsync|-xinput|-xinput2|-egl|-reduce-exports|-pch|-separate-debug-info|-stl|-freetype|-xcursor|-xfixes|-xrandr|-xrender|-mitshm|-fontconfig|-xkb|-xcb|-eglfs|-directfb|-nis|-dbus|-dbus-linked|-glib|-gstreamer|-gtkstyle|-cups|-iconv|-largefile|-h|-help|-v|-verbose|-debug|-release|-fast|-accessibility|-confirm-license|-gnumake|-framework|-debug-and-release|-exceptions|-harfbuzz|-prefix-install|-silent|-optimized-qmake|-dwarf2|-reduce-relocations|-sse|-openssl|-openssl-linked|-phonon-backend|-audio-backend|-qml-debug|-javascript-jit|-rpath|-pkg-config|-force-pkg-config|-icu|-force-asserts|-testcocoon)
VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
VAL=yes
;;
@@ -1651,6 +1652,13 @@ while [ "$#" -gt 0 ]; do
UNKNOWN_OPT=yes
fi
;;
+ directfb)
+ if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
+ CFG_DIRECTFB="$VAL"
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
libudev)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
CFG_LIBUDEV="$VAL"
@@ -2839,6 +2847,13 @@ if [ "$OPT_HELP" = "yes" ]; then
EGLFSN=" "
fi
+ if [ "$CFG_DIRECTFB" = "no"]; then
+ DFBY=" "
+ DFBN="*"
+ else
+ DFBY="*"
+ DFBN=" "
+ fi
if [ "$CFG_XINPUT2" = "no" ]; then
X2Y=" "
X2N="*"
@@ -3135,6 +3150,9 @@ Additional options:
$EGLFSN -no-eglfs .......... Do not compile EGLFS (EGL Full Screen/Single Surface) support.
$EGLFSY -eglfs ............. Compile EGLFS support.
+ $DFBN -no-directfb ....... Do not compile DirectFB support.
+ $DFBY -directfb .......... Compile DirectFB support.
+
-xplatform target ... The target platform when cross-compiling.
-sysroot <dir> ...... Sets <dir> as the target compiler's and qmake's sysroot.
@@ -4493,6 +4511,7 @@ fi
# Save these for a check later
ORIG_CFG_XCB="$CFG_XCB"
ORIG_CFG_EGLFS="$CFG_EGLFS"
+ORIG_CFG_DIRECTFB="$CFG_DIRECTFB"
if [ "$CFG_LIBUDEV" != "no" ]; then
if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists libudev 2>/dev/null; then
@@ -4600,6 +4619,16 @@ if [ "$CFG_XCB" != "no" ]; then
fi
fi
+if [ "$CFG_DIRECTFB" != "no" ]; then
+ if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists directfb 2>/dev/null; then
+ QMAKE_CFLAGS_DIRECTFB=`$PKG_CONFIG --cflags directfb 2>/dev/null`
+ QMAKE_LIBS_DIRECTFB=`$PKG_CONFIG --libs directfb 2>/dev/null`
+ QT_CONFIG="$QT_CONFIG directfb"
+ else
+ CFG_DIRECTFB=no
+ fi
+fi
+
# Detect libxkbcommon
if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists xkbcommon 2>/dev/null; then
QMAKE_CFLAGS_XKBCOMMON="`$PKG_CONFIG --cflags xkbcommon 2>/dev/null`"
@@ -4647,6 +4676,10 @@ if [ -n "$QMAKE_CFLAGS_XCB" ] || [ -n "$QMAKE_LIBS_XCB" ]; then
QMakeVar set QMAKE_LIBS_XCB "$QMAKE_LIBS_XCB"
QMakeVar set QMAKE_DEFINES_XCB "$QMAKE_DEFINES_XCB"
fi
+if [ -n "$QMAKE_CFLAGS_DIRECTFB" ] || [ -n "$QMAKE_LIBS_DIRECTFB" ]; then
+ QMakeVar set QMAKE_CFLAGS_DIRECTFB "$QMAKE_CFLAGS_DIRECTFB"
+ QMakeVar set QMAKE_LIBS_DIRECTFB "$QMAKE_LIBS_DIRECTFB"
+fi
if [ "$BUILD_ON_MAC" = "yes" ]; then
if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/mac/coreservices "CoreServices" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
@@ -4657,12 +4690,12 @@ if [ "$BUILD_ON_MAC" = "yes" ]; then
fi
if [ "$BUILD_ON_MAC" = "no" ] && [ "$XPLATFORM_MINGW" = "no" ]; then
- if [ "$CFG_XCB" = "no" ] && [ "$CFG_EGLFS" = "no" ]; then
+ if [ "$CFG_XCB" = "no" ] && [ "$CFG_EGLFS" = "no" ] && [ "$CFG_DIRECTFB" = "no" ]; then
if [ "$QPA_PLATFORM_GUARD" = "yes" ] &&
- ( [ "$ORIG_CFG_XCB" = "auto" ] || [ "$ORIG_CFG_EGLFS" = "auto" ] ); then
+ ( [ "$ORIG_CFG_XCB" = "auto" ] || [ "$ORIG_CFG_EGLFS" = "auto" ] || [ "$ORIG_CFG_DIRECTFB" = "auto" ] ); then
echo "No QPA platform plugin enabled!"
echo " If you really want to build without a QPA platform plugin you must pass"
- echo " -no-xcb and -no-eglfs to configure. Doing this will"
+ echo " -no-xcb, -no-eglfs and -no-directfb to configure. Doing this will"
echo " produce a Qt that cannot run GUI applications."
echo " The dependencies needed for xcb to build are listed in"
echo " src/plugins/platforms/xcb/README"
@@ -6068,6 +6101,7 @@ if [ "$XPLATFORM_MAEMO" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
echo "XInput2 support ........ $CFG_XINPUT2"
fi
echo "EGLFS support .......... $CFG_EGLFS"
+echo "DirectFB support ....... $CFG_DIRECTFB"
echo
# complain about not being able to use dynamic plugins if we are using a static build
diff --git a/mkspecs/devices/linux-mipsel-broadcom-97425-g++/qmake.conf b/mkspecs/devices/linux-mipsel-broadcom-97425-g++/qmake.conf
index ced323feba..e69a3cee4b 100644
--- a/mkspecs/devices/linux-mipsel-broadcom-97425-g++/qmake.conf
+++ b/mkspecs/devices/linux-mipsel-broadcom-97425-g++/qmake.conf
@@ -55,15 +55,13 @@ QMAKE_LIBS_OPENGL_ES2 = -lv3ddriver -lrt
INCLUDEPATH += $${BRCM_APPLIBS_PATH}/opensource/zlib/zlib-1.2.3
QMAKE_LIBDIR += $${BRCM_APPLIBS_PATH}/opensource/zlib/zlib-1.2.3
-# DirectFB, needs to be changed once -directfb is added to configure
-DIRECTFB_INCLUDEPATH = $${BRCM_APPLIBS_PATH}/opensource/directfb/bin/DirectFB-1.4.15_multi_$${BRCM_BUILD_TYPE}_build.97425B1/usr/local/include/directfb $${BRCM_ROCKFORD_PATH}/middleware/platform/directfb
-DIRECTFB_LIBS = -L$${BRCM_APPLIBS_PATH}/opensource/directfb/bin/DirectFB-1.4.15_multi_$${BRCM_BUILD_TYPE}_build.97425B1/usr/local/lib -L$${BRCM_ROCKFORD_PATH}/middleware/platform/directfb/lib_$${BRCM_PLATFORM}_$${BRCM_BUILD_TYPE} -ldirectfb -lfusion -ldirect -lpthread -lnexus -ldbpl -lz
-
-
QMAKE_LFLAGS += -Wl,-rpath-link,$$QMAKE_LIBDIR_OPENGL_ES2 -Wl,-rpath-link,$${BRCM_APPLIBS_PATH}/opensource/zlib/zlib-1.2.3
# DirectFB platform hooks for this hardware
QT_CONFIG += directfb_egl
DIRECTFB_PLATFORM_HOOKS_SOURCES = $$PWD/qdirectfbeglhooks_bcm97425.cpp
+DIRECTFB_PLATFORM_HOOKS_INCLUDEPATH = $${BRCM_ROCKFORD_PATH}/middleware/platform/directfb
+DIRECTFB_PLATFORM_HOOKS_LIBS = -ldbpl
+DIRECTFB_PLATFORM_HOOKS_LIBDIR = $${BRCM_ROCKFORD_PATH}/middleware/platform/directfb/lib_$${BRCM_PLATFORM}_$${BRCM_BUILD_TYPE}
load(qt_config)
diff --git a/src/plugins/platforms/directfb/directfb.pro b/src/plugins/platforms/directfb/directfb.pro
index 2251b8f278..5dfddeb225 100644
--- a/src/plugins/platforms/directfb/directfb.pro
+++ b/src/plugins/platforms/directfb/directfb.pro
@@ -4,15 +4,8 @@ DESTDIR = $$QT.gui.plugins/platforms
QT += core-private gui-private platformsupport-private
-isEmpty(DIRECTFB_LIBS) {
- DIRECTFB_LIBS = -ldirectfb -lfusion -ldirect -lpthread
-}
-isEmpty(DIRECTFB_INCLUDEPATH) {
- DIRECTFB_INCLUDEPATH = /usr/include/directfb
-}
-
-INCLUDEPATH += $$DIRECTFB_INCLUDEPATH
-LIBS += $$DIRECTFB_LIBS
+LIBS += $$QMAKE_LIBS_DIRECTFB
+QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_DIRECTFB
SOURCES = main.cpp \
qdirectfbintegration.cpp \
@@ -44,6 +37,9 @@ directfb_egl {
HEADERS += $$DIRECTFB_PLATFORM_HOOKS_HEADERS
SOURCES += $$DIRECTFB_PLATFORM_HOOKS_SOURCES
DEFINES += DIRECTFB_PLATFORM_HOOKS
+ LIBS += $$DIRECTFB_PLATFORM_HOOKS_LIBS
+ QMAKE_LIBDIR += $$DIRECTFB_PLATFORM_HOOKS_LIBDIR
+ INCLUDEPATH += $$DIRECTFB_PLATFORM_HOOKS_INCLUDEPATH
} else {
SOURCES += qdirectfbeglhooks_stub.cpp
}
diff --git a/src/plugins/platforms/platforms.pro b/src/plugins/platforms/platforms.pro
index 1321270dc6..51de06f910 100644
--- a/src/plugins/platforms/platforms.pro
+++ b/src/plugins/platforms/platforms.pro
@@ -17,3 +17,7 @@ qnx {
contains(QT_CONFIG, eglfs) {
SUBDIRS += eglfs
}
+
+contains(QT_CONFIG, directfb) {
+ SUBDIRS += directfb
+}