mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-25 19:07:45 +00:00
Improved package build script for MacOS. Handle compiler standard for Qt6.
This commit is contained in:
parent
8338d1032d
commit
9d6e704183
@ -284,9 +284,9 @@ while [ $# -gt 0 ]; do
|
||||
LyxOnlyPackage=$(echo ${1}|cut -d= -f2)
|
||||
shift
|
||||
;;
|
||||
--enable-cxx11)
|
||||
--enable-cxx11|--enable-cxx-mode=*)
|
||||
LyXConfigureOptions="${LyXConfigureOptions} ${1}"
|
||||
EnableCXX11="--enable-cxx11"
|
||||
EnableCXXMode="${1}"
|
||||
shift
|
||||
;;
|
||||
--*)
|
||||
@ -374,6 +374,12 @@ case "${QtVersion}" in
|
||||
6*)
|
||||
QtLibraries=${QtLibraries:-"QtCore5Compat QtDBus QtSvg QtXml QtPrintSupport QtSvgWidgets QtWidgets QtGui QtNetwork QtConcurrent QtCore"}
|
||||
QtFrameworkVersion="A"
|
||||
case "${EnableCXXMode}" in
|
||||
--enable-cxx11|--enable-cxx-mode=11)
|
||||
echo Warning: Adjust cxx standard "${EnableCXXMode}" for Qt 6. C++17 or better is required.
|
||||
EnableCXXMode="--enable-cxx-mode=17"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
QtLibraries=${QtLibraries:-"QtSvg QtXml QtGui QtNetwork QtCore"}
|
||||
@ -412,6 +418,19 @@ esac
|
||||
MYCFLAGS="-mmacosx-version-min=${MACOSX_DEPLOYMENT_TARGET}"
|
||||
MYLDFLAGS="-mmacosx-version-min=${MACOSX_DEPLOYMENT_TARGET}"
|
||||
|
||||
case "${EnableCXXMode}" in
|
||||
--enable-cxx11|--enable-cxx-mode=11)
|
||||
export CC=cc
|
||||
export CXX="c++ -stdlib=libc++"
|
||||
export CXXFLAGS=-std=c++11
|
||||
;;
|
||||
--enable-cxx-mode=17)
|
||||
export CC=cc
|
||||
export CXX="c++ -stdlib=libc++"
|
||||
export CXXFLAGS=-std=c++17
|
||||
;;
|
||||
esac
|
||||
|
||||
build_qt() {
|
||||
echo Build Qt library ${QtSourceDir}
|
||||
if [ "${QtInstallDir}" = "${QtBuildDir}" ]; then
|
||||
@ -641,14 +660,6 @@ build_lyx() {
|
||||
rm -rf "${LyxAppPrefix}"
|
||||
fi
|
||||
|
||||
case "${EnableCXX11}" in
|
||||
"--enable-cxx11")
|
||||
export CC=cc
|
||||
export CXX="c++ -stdlib=libc++"
|
||||
export CXXFLAGS=-std=c++11
|
||||
;;
|
||||
esac
|
||||
|
||||
# -------------------------------------
|
||||
# Automate configure check
|
||||
# -------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user