Skip to content

Commit

Permalink
Still working on MSYS2 build, conflicting Qt locations between Win Qt…
Browse files Browse the repository at this point in the history
… install and Msys2 Qt install.
  • Loading branch information
ahlstromcj committed Oct 28, 2024
1 parent 89040e7 commit b477879
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 22 deletions.
16 changes: 10 additions & 6 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ dnl \file configure.ac
dnl \library Seq66
dnl \author Chris Ahlstrom
dnl \date 2018-11-09
dnl \update 2024-10-26
dnl \update 2024-10-28
dnl \version $Revision$
dnl \license $XPC_SUITE_GPL_LICENSE$
dnl
Expand Down Expand Up @@ -507,11 +507,15 @@ if test "$ac_build_qt" != "no" ; then
if test "$ac_build_windows" != "yes" ; then
AM_PATH_ALSA(0.9.0)
fi
if test "$ac_clang_active" = "yes" ; then
AX_HAVE_QT_CLANG
else
AX_HAVE_QT_MIN
fi
if test "$ac_build_windows" = "yes" ; then
AX_HAVE_QT
else
if test "$ac_clang_active" = "yes" ; then
AX_HAVE_QT_CLANG
else
AX_HAVE_QT_MIN
fi
fi
AC_MSG_RESULT([qt user-interface build enabled]);
fi

Expand Down
26 changes: 14 additions & 12 deletions m4/ax_have_qt.m4
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
# QT_LRELEASE
# QT_LUPDATE
# QT_DIR
# QMAKE
#
# which respectively contain an "-I" flag pointing to the Qt include
# directory, link flags necessary to link with Qt and X, the full path to
Expand Down Expand Up @@ -54,30 +55,31 @@
# and this notice are preserved. This file is offered as-is, without any
# warranty.

#serial 19
#serial 25

AU_ALIAS([BNV_HAVE_QT], [AX_HAVE_QT])
AC_DEFUN([AX_HAVE_QT],
[
AC_REQUIRE([AC_PROG_CXX])
AC_REQUIRE([AC_PATH_X])
AC_REQUIRE([AC_PATH_XTRA])
AC_MSG_CHECKING(for Qt)
# openSUSE leap 15.3 installs qmake-qt5, not qmake, for example.
# Store the full name (like qmake-qt5) into am_have_qt_qmexe
# Store the full name (like qmake-qt5) into QMAKE
# and the specifier (like -qt5 or empty) into am_have_qt_qmexe_suff.
AC_CHECK_PROGS(am_have_qt_qmexe,qmake qmake-qt6 qmake-qt5,[])
am_have_qt_qmexe_suff=`echo $am_have_qt_qmexe | cut -b 6-`
AC_ARG_VAR([QMAKE],"Qt make tool")
AC_CHECK_TOOLS([QMAKE],[qmake qmake-qt6 qmake-qt5],[false])
AC_MSG_CHECKING(for Qt)
am_have_qt_qmexe_suff=`echo $QMAKE | sed 's,^.*qmake,,'`
# If we have Qt5 or later in the path, we're golden
ver=`$am_have_qt_qmexe --version | grep -o "Qt version ."`
ver=`$QMAKE --version | grep -o "Qt version ."`
if test "$ver" ">" "Qt version 4"; then
have_qt=yes
# This pro file dumps qmake's variables, but it only works on Qt 5 or later
am_have_qt_dir=`mktemp -d`
am_have_qt_pro="$am_have_qt_dir/test.pro"
am_have_qt_stash="$am_have_qt_dir/.qmake.stash"
am_have_qt_makefile="$am_have_qt_dir/Makefile"
# http://qt-project.org/doc/qt-5/qmake-variable-reference.html#qt
cat > $am_have_qt_pro << EOF
Expand Down Expand Up @@ -114,15 +116,14 @@ qtHaveModule(webkit): QT += webkit
qtHaveModule(webkitwidgets): QT += webkitwidgets
qtHaveModule(xml): QT += xml
qtHaveModule(xmlpatterns): QT += xmlpatterns
percent.target = %
percent.commands = @echo -n "\$(\$(@))\ "
QMAKE_EXTRA_TARGETS += percent
EOF
$am_have_qt_qmexe $am_have_qt_pro -o $am_have_qt_makefile
$QMAKE $am_have_qt_pro -o $am_have_qt_makefile
QT_CXXFLAGS=`cd $am_have_qt_dir; make -s -f $am_have_qt_makefile CXXFLAGS INCPATH`
QT_LIBS=`cd $am_have_qt_dir; make -s -f $am_have_qt_makefile LIBS`
rm $am_have_qt_pro $am_have_qt_makefile
rm $am_have_qt_pro $am_have_qt_stash $am_have_qt_makefile
rmdir $am_have_qt_dir
# Look for specific tools in $PATH
Expand All @@ -133,7 +134,7 @@ EOF
QT_LUPDATE=`which lupdate$am_have_qt_qmexe_suff`
# Get Qt version from qmake
QT_DIR=`$am_have_qt_qmexe --version | grep -o -E /.+`
QT_DIR=`$QMAKE --version | grep -o -E /.+`
# All variables are defined, report the result
AC_MSG_RESULT([$have_qt:
Expand Down Expand Up @@ -166,6 +167,7 @@ EOF
AC_SUBST(QT_RCC)
AC_SUBST(QT_LRELEASE)
AC_SUBST(QT_LUPDATE)
AC_SUBST(QMAKE)
#### Being paranoid:
if test x"$have_qt" = xyes; then
Expand Down
6 changes: 2 additions & 4 deletions nsis/build_release_package.bat
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
REM REM @echo off
@echo off
:: **************************************************************************
:: Seq66 Windows Build-Release Package
:: --------------------------------------------------------------------------
Expand All @@ -7,7 +7,7 @@ REM REM @echo off
:: \library Seq66 for Windows
:: \author Chris Ahlstrom
:: \date 2018-05-26
:: \update 2024-10-25
:: \update 2024-10-28
:: \license $XPC_SUITE_GPL_LICENSE$
::
:: This script sets up and creates a release build of Seq66 for
Expand Down Expand Up @@ -253,8 +253,6 @@ echo %QMAKE% %QMAKEOPTS% %CONFIG_SET% %PROJECT_REL_ROOT%\%PROJECT_PRO% >> %LOG%
echo %MINGMAKE% with output to make.log >> %LOG% 2>&1
%MINGMAKE% >> %LOG% 2>&1

PAUSE

:: if %ERRORLEVEL% NEQ 0 goto builderror

if ERRORLEVEL 1 goto builderror
Expand Down

0 comments on commit b477879

Please sign in to comment.