mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
Qt4 detection by using pkg-config is not default anymore, to enable it, use --with-qt-pkg-config
Added support for QtTest in pkg-config detection. git-svn-id: http://svn.osgeo.org/qgis/trunk@5257 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
471d17bcd0
commit
e6656035dd
20
acinclude.m4
20
acinclude.m4
@ -515,16 +515,19 @@ AC_DEFUN([AQ_CHECK_QT4],[
|
|||||||
|
|
||||||
AC_ARG_WITH([qtdir], AC_HELP_STRING([--with-qtdir=DIR],[Qt4 installation directory]),
|
AC_ARG_WITH([qtdir], AC_HELP_STRING([--with-qtdir=DIR],[Qt4 installation directory]),
|
||||||
QTDIR="$withval", QTDIR="")
|
QTDIR="$withval", QTDIR="")
|
||||||
|
AC_ARG_WITH([qt-pkg-config], AC_HELP_STRING([--with-qt-pkg-config],
|
||||||
|
[Detect Qt4 directory using pkg-config instead of using --with-qtdir. Works only with Qt4 version for X11.]),
|
||||||
|
QT_PKG_CONFIG="y", QT_PKG_CONFIG="n")
|
||||||
|
|
||||||
QT_MIN_VER=4.1.0
|
if test "$QT_PKG_CONFIG" = "y" ; then
|
||||||
|
|
||||||
if test "x$QTDIR" = "x" ; then
|
|
||||||
|
|
||||||
dnl ---------------------------------------------------------------------------
|
dnl ---------------------------------------------------------------------------
|
||||||
dnl we will use PKGCONFIG, check that all needed Qt4 components are there
|
dnl we will use PKGCONFIG, check that all needed Qt4 components are there
|
||||||
dnl ---------------------------------------------------------------------------
|
dnl ---------------------------------------------------------------------------
|
||||||
|
|
||||||
PKG_CHECK_MODULES(QT, QtCore QtGui Qt3Support QtNetwork QtXml QtSvg >= $QT_MIN_VER)
|
QT_MIN_VER=4.1.0
|
||||||
|
|
||||||
|
PKG_CHECK_MODULES(QT, QtCore QtGui Qt3Support QtNetwork QtXml QtSvg QtTest >= $QT_MIN_VER)
|
||||||
|
|
||||||
dnl check for Qt binaries needed for compilation: moc,uic,rcc
|
dnl check for Qt binaries needed for compilation: moc,uic,rcc
|
||||||
dnl (we could also check for moc and uic versions)
|
dnl (we could also check for moc and uic versions)
|
||||||
@ -542,6 +545,15 @@ AC_DEFUN([AQ_CHECK_QT4],[
|
|||||||
AC_MSG_ERROR([*** rcc must be in path])
|
AC_MSG_ERROR([*** rcc must be in path])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
dnl workaround for case when QtTest doesn't report QtTest subdirectory
|
||||||
|
dnl in include path (this is not a very nice check)
|
||||||
|
PKG_CHECK_MODULES(QT_TEST, QtTest >= $QT_MIN_VER)
|
||||||
|
QT_TEST_CFLAGS=`echo $QT_TEST_CFLAGS | sed 's/[ \t]*$//'` # remove trailing spaces
|
||||||
|
QTTEST_HAS_SUBDIR=`echo $QT_TEST_CFLAGS | grep '/QtTest' | wc -l`
|
||||||
|
if test "$QTTEST_HAS_SUBDIR" -eq "0" ; then
|
||||||
|
QT_CFLAGS="$QT_CFLAGS $QT_TEST_CFLAGS/QtTest"
|
||||||
|
fi
|
||||||
|
|
||||||
dnl set and display variables
|
dnl set and display variables
|
||||||
|
|
||||||
QT_CXXFLAGS="-DQT3_SUPPORT $QT_CFLAGS"
|
QT_CXXFLAGS="-DQT3_SUPPORT $QT_CFLAGS"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user