diff --git a/config/qt.m4 b/config/qt.m4 index 129e2ab61c..b9ffe284a1 100644 --- a/config/qt.m4 +++ b/config/qt.m4 @@ -44,6 +44,7 @@ AC_DEFUN([QT_CHECK_COMPILE], qt_cv_libname= for libname in $qt_guilibs \ '-framework QtCore -framework QtConcurrent -framework QtSvg -framework QtWidgets -framework QtMacExtras -framework QtGui'\ + '-framework QtCore -framework QtConcurrent -framework QtSvg -framework QtSvgWidgets -framework QtWidgets -framework QtGui'\ '-framework QtCore -framework QtGui' do QT_TRY_LINK($libname) @@ -366,21 +367,27 @@ AC_DEFUN([QT_DO_MANUAL_CONFIG], QT_CORE_LDFLAGS= if test -n "$qt_cv_includes"; then QT_INCLUDES="-I$qt_cv_includes" - for i in Qt QtCore QtGui QtWidgets QtSvg QtConcurrent QtMacExtras; do + for i in Qt QtCore QtGui QtWidgets QtSvg QtConcurrent QtSvgWidgets QtCore5Compat QtMacExtras; do QT_INCLUDES="$QT_INCLUDES -I$qt_cv_includes/$i" + if test "$lyx_use_packaging" = "macosx" ; then + QT_INCLUDES="$QT_INCLUDES -I$qt_cv_libraries/${i}.framework/Headers" + fi done QT_CORE_INCLUDES="-I$qt_cv_includes -I$qt_cv_includes/QtCore" fi case "$qt_cv_libraries" in - *framework*) - QT_LDFLAGS="-F$qt_cv_libraries" - QT_CORE_LDFLAGS="-F$qt_cv_libraries" - ;; "") ;; *) - QT_LDFLAGS="-L$qt_cv_libraries" - QT_CORE_LDFLAGS="-L$qt_cv_libraries" + if test "$lyx_use_packaging" = "macosx" ; then + QT_INCLUDES="$QT_INCLUDES -F$qt_cv_libraries" + QT_CORE_INCLUDES="$QT_CORE_INCLUDES -I$qt_cv_libraries/QtCore.framework/Headers -F$qt_cv_libraries" + QT_LDFLAGS="-F$qt_cv_libraries" + QT_CORE_LDFLAGS="-F$qt_cv_libraries" + else + QT_LDFLAGS="-L$qt_cv_libraries" + QT_CORE_LDFLAGS="-L$qt_cv_libraries" + fi ;; esac AC_SUBST(QT_INCLUDES) diff --git a/development/LyX-Mac-binary-release.sh b/development/LyX-Mac-binary-release.sh index 00b58e435e..7cd3b794af 100644 --- a/development/LyX-Mac-binary-release.sh +++ b/development/LyX-Mac-binary-release.sh @@ -374,6 +374,10 @@ case "${QtVersion}" in QtLibraries=${QtLibraries:-"QtSvg QtXml QtPrintSupport QtMacExtras QtWidgets QtGui QtNetwork QtConcurrent QtCore"} QtFrameworkVersion="5" ;; +6*) + QtLibraries=${QtLibraries:-"QtCore5Compat QtDBus QtSvg QtXml QtPrintSupport QtSvgWidgets QtWidgets QtGui QtNetwork QtConcurrent QtCore"} + QtFrameworkVersion="A" + ;; *) QtLibraries=${QtLibraries:-"QtSvg QtXml QtGui QtNetwork QtCore"} QtFrameworkVersion="4" @@ -425,16 +429,6 @@ build_qt() { "${QtSourceDir}"/configure ${QtConfigureOptions} ${QTARCHS} -prefix "${QtInstallDir}" make -j1 && make -j1 install ) - if [ -d "${QtInstallDir}" -a ! -f "${QtInstallDir}"/include/QtCore ]; then - cd "${QtInstallDir}" && ( - mkdir -p include - cd include - for libnm in ${QtLibraries} ; do - test -d ${libnm} -o -L ${libnm} || \ - ( ln -s ../lib/${libnm}.framework/Headers ${libnm} && echo Link to framework ${libnm} ) - done - ) - fi } case ${QtOnlyPackage:-"no"} in @@ -697,7 +691,7 @@ build_lyx() { mkdir -p "${LyxBuildDir}" && cd "${LyxBuildDir}" CPPFLAGS="${SDKROOT:+-isysroot ${SDKROOT}} -arch ${arch} ${MYCFLAGS}" - LDFLAGS="${SDKROOT:+-isysroot ${SDKROOT}} -arch ${arch} ${MYLDFLAGS} -F${QtInstallDir}/lib" + LDFLAGS="${SDKROOT:+-isysroot ${SDKROOT}} -arch ${arch} ${MYLDFLAGS}" if [ "$configure_qt_frameworks" = "yes" ]; then export QT_CORE_CFLAGS="-FQtCore"