From e2594c8bb9eaadb39cda7d3a844c9294460dbe74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C4=83t=C4=83lin=20R=C4=83ceanu?= Date: Sun, 24 Jun 2018 19:46:58 +0300 Subject: [PATCH] Add QT5_CUSTOM_DIR as Qt root dir for install and lib subdirs --- configure.in | 33 +++++++++++++++++++++++---------- docs/qt/install.txt | 15 +++++++++++++++ 2 files changed, 38 insertions(+), 10 deletions(-) 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 --------------------------