diff --git a/configure.in b/configure.in index e0f500ce93..2272f0f03d 100644 --- a/configure.in +++ b/configure.in @@ -3361,12 +3361,24 @@ libraries returned by 'pkg-config gtk+-2.0 --libs' or 'gtk-config if test "$wxUSE_QT" = 1; then - PKG_CHECK_MODULES(QT5, + TOOLKIT=QT + GUIDIST=QT_DIST + TOOLKIT_DIR="qt" + + if test -n "$QT5_CUSTOM_DIR" ; then + dnl the name of the directory where the files for this toolkit live + TOOLKIT_INCLUDE="${TOOLKIT_INCLUDE} -I${QT5_CUSTOM_DIR}/include" + GUI_TK_LIBRARY="${GUI_TK_LIBRARY} -L${QT5_CUSTOM_DIR}/lib \ + -lQt5Core -lQt5Widgets -lQt5Gui -lQt5OpenGL -lQt5Test \ + -Wl,-rpath,${QT5_CUSTOM_DIR}/lib" + + elif test -z "$PKG_CONFIG" ; then + AC_MSG_ERROR([specify QT5_CUSTOM_DIR or make sure pkg-config is available to search for Qt5 libraries]) + + else + PKG_CHECK_MODULES(QT5, [Qt5Core Qt5Widgets Qt5Gui Qt5OpenGL Qt5Test], - [ - TOOLKIT=QT - GUIDIST=QT_DIST - TOOLKIT_DIR="qt" + [ TOOLKIT_INCLUDE="${TOOLKIT_INCLUDE} ${QT5_CFLAGS}" GUI_TK_LIBRARY="${GUI_TK_LIBRARY} ${QT5_LIBS}" if `pkg-config --variable qt_config Qt5Core | grep "reduce_relocations" >/dev/null`; then @@ -3374,11 +3386,12 @@ libraries returned by 'pkg-config gtk+-2.0 --libs' or 'gtk-config SAMPLES_CXXFLAGS="-fPIC $SAMPLES_CXXFLAGS" WXCONFIG_CXXFLAGS="-fPIC $WXCONFIG_CXXFLAGS" fi - ], - [ - AC_MSG_ERROR([Qt5 libraries are not available]) - ] - ) + ], + [ + AC_MSG_ERROR([Qt5 libraries are not available]) + ] + ) + fi fi dnl the name of the directory where the files for this toolkit live TOOLKIT_DIR=`echo ${TOOLKIT} | tr '[[A-Z]]' '[[a-z]]'` diff --git a/docs/qt/install.txt b/docs/qt/install.txt index 3bed60b9a5..c3868ab6c7 100644 --- a/docs/qt/install.txt +++ b/docs/qt/install.txt @@ -91,6 +91,21 @@ cd tests make ./test_gui +* Building wxQT, using qt-unified-XXX-online installer +------------------------------------------------------ + +Download qt-unified-XXX-online installer from the qt website. +Install the Qt package of your choice (with the same minimum version +restriction as above). +The same build instructions apply, except that you need to explicitly pass +to configure the Qt dir of the build intended to use as QT5_CUSTOM_DIR, i.e. + +# for Linux: +../configure --with-qt --enable-debug QT5_CUSTOM_DIR=~/Qt/5.11.0/gcc_64 + +# for Windows (ran from Git Bash, or any other Unix-like shell): +../configure --with-qt --enable-debug QT5_CUSTOM_DIR=/c/Qt/5.11.0/mingw53_32 + * Building wxGT on Android --------------------------