mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Improved Qt framework configuration detection on macOS, add support for Qt6
This commit is contained in:
parent
c52344e859
commit
aabe9e8b11
21
config/qt.m4
21
config/qt.m4
@ -44,6 +44,7 @@ AC_DEFUN([QT_CHECK_COMPILE],
|
|||||||
qt_cv_libname=
|
qt_cv_libname=
|
||||||
for libname in $qt_guilibs \
|
for libname in $qt_guilibs \
|
||||||
'-framework QtCore -framework QtConcurrent -framework QtSvg -framework QtWidgets -framework QtMacExtras -framework QtGui'\
|
'-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'
|
'-framework QtCore -framework QtGui'
|
||||||
do
|
do
|
||||||
QT_TRY_LINK($libname)
|
QT_TRY_LINK($libname)
|
||||||
@ -366,21 +367,27 @@ AC_DEFUN([QT_DO_MANUAL_CONFIG],
|
|||||||
QT_CORE_LDFLAGS=
|
QT_CORE_LDFLAGS=
|
||||||
if test -n "$qt_cv_includes"; then
|
if test -n "$qt_cv_includes"; then
|
||||||
QT_INCLUDES="-I$qt_cv_includes"
|
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"
|
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
|
done
|
||||||
QT_CORE_INCLUDES="-I$qt_cv_includes -I$qt_cv_includes/QtCore"
|
QT_CORE_INCLUDES="-I$qt_cv_includes -I$qt_cv_includes/QtCore"
|
||||||
fi
|
fi
|
||||||
case "$qt_cv_libraries" in
|
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"
|
if test "$lyx_use_packaging" = "macosx" ; then
|
||||||
QT_CORE_LDFLAGS="-L$qt_cv_libraries"
|
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
|
esac
|
||||||
AC_SUBST(QT_INCLUDES)
|
AC_SUBST(QT_INCLUDES)
|
||||||
|
@ -374,6 +374,10 @@ case "${QtVersion}" in
|
|||||||
QtLibraries=${QtLibraries:-"QtSvg QtXml QtPrintSupport QtMacExtras QtWidgets QtGui QtNetwork QtConcurrent QtCore"}
|
QtLibraries=${QtLibraries:-"QtSvg QtXml QtPrintSupport QtMacExtras QtWidgets QtGui QtNetwork QtConcurrent QtCore"}
|
||||||
QtFrameworkVersion="5"
|
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"}
|
QtLibraries=${QtLibraries:-"QtSvg QtXml QtGui QtNetwork QtCore"}
|
||||||
QtFrameworkVersion="4"
|
QtFrameworkVersion="4"
|
||||||
@ -425,16 +429,6 @@ build_qt() {
|
|||||||
"${QtSourceDir}"/configure ${QtConfigureOptions} ${QTARCHS} -prefix "${QtInstallDir}"
|
"${QtSourceDir}"/configure ${QtConfigureOptions} ${QTARCHS} -prefix "${QtInstallDir}"
|
||||||
make -j1 && make -j1 install
|
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
|
case ${QtOnlyPackage:-"no"} in
|
||||||
@ -697,7 +691,7 @@ build_lyx() {
|
|||||||
mkdir -p "${LyxBuildDir}" && cd "${LyxBuildDir}"
|
mkdir -p "${LyxBuildDir}" && cd "${LyxBuildDir}"
|
||||||
|
|
||||||
CPPFLAGS="${SDKROOT:+-isysroot ${SDKROOT}} -arch ${arch} ${MYCFLAGS}"
|
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
|
if [ "$configure_qt_frameworks" = "yes" ]; then
|
||||||
export QT_CORE_CFLAGS="-FQtCore"
|
export QT_CORE_CFLAGS="-FQtCore"
|
||||||
|
Loading…
Reference in New Issue
Block a user