2012-02-08 10:38:07 +00:00
|
|
|
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
|
|
|
::
|
2016-01-15 12:36:27 +00:00
|
|
|
:: Copyright (C) 2016 The Qt Company Ltd.
|
2016-01-21 02:33:50 +00:00
|
|
|
:: Copyright (C) 2016 Intel Corporation.
|
2016-01-15 12:36:27 +00:00
|
|
|
:: Contact: https://www.qt.io/licensing/
|
2012-02-08 10:38:07 +00:00
|
|
|
::
|
|
|
|
:: This file is part of the tools applications of the Qt Toolkit.
|
|
|
|
::
|
2016-01-15 12:36:27 +00:00
|
|
|
:: $QT_BEGIN_LICENSE:GPL-EXCEPT$
|
2012-09-19 12:28:29 +00:00
|
|
|
:: Commercial License Usage
|
|
|
|
:: Licensees holding valid commercial Qt licenses may use this file in
|
|
|
|
:: accordance with the commercial license agreement provided with the
|
|
|
|
:: Software or, alternatively, in accordance with the terms contained in
|
2015-01-28 08:44:43 +00:00
|
|
|
:: a written agreement between you and The Qt Company. For licensing terms
|
2016-01-15 12:36:27 +00:00
|
|
|
:: and conditions see https://www.qt.io/terms-conditions. For further
|
|
|
|
:: information use the contact form at https://www.qt.io/contact-us.
|
2012-09-19 12:28:29 +00:00
|
|
|
::
|
2016-01-15 12:36:27 +00:00
|
|
|
:: GNU General Public License Usage
|
|
|
|
:: Alternatively, this file may be used under the terms of the GNU
|
|
|
|
:: General Public License version 3 as published by the Free Software
|
|
|
|
:: Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
|
|
|
|
:: included in the packaging of this file. Please review the following
|
|
|
|
:: information to ensure the GNU General Public License requirements will
|
|
|
|
:: be met: https://www.gnu.org/licenses/gpl-3.0.html.
|
2012-02-08 10:38:07 +00:00
|
|
|
::
|
|
|
|
:: $QT_END_LICENSE$
|
|
|
|
::
|
|
|
|
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
|
|
|
|
|
|
|
@echo off
|
2016-08-01 10:40:03 +00:00
|
|
|
setlocal ENABLEEXTENSIONS
|
|
|
|
set ARGS=%*
|
2012-02-08 10:38:07 +00:00
|
|
|
set QTSRC=%~dp0
|
|
|
|
set QTDIR=%CD%
|
2015-09-18 01:17:40 +00:00
|
|
|
|
2016-08-01 10:40:03 +00:00
|
|
|
:doargs
|
|
|
|
if "%~1" == "" goto doneargs
|
|
|
|
|
|
|
|
if "%~1" == "/?" goto help
|
|
|
|
if "%~1" == "-?" goto help
|
|
|
|
if /i "%~1" == "/h" goto help
|
|
|
|
if /i "%~1" == "-h" goto help
|
|
|
|
if /i "%~1" == "/help" goto help
|
|
|
|
if /i "%~1" == "-help" goto help
|
|
|
|
if /i "%~1" == "--help" goto help
|
|
|
|
|
|
|
|
shift
|
|
|
|
goto doargs
|
|
|
|
:doneargs
|
|
|
|
|
2012-02-08 10:38:07 +00:00
|
|
|
echo Please wait while bootstrapping configure ...
|
|
|
|
|
2016-02-10 12:05:26 +00:00
|
|
|
for %%C in (clang-cl.exe cl.exe icl.exe g++.exe perl.exe jom.exe) do set %%C=%%~$PATH:C
|
2012-02-08 10:38:07 +00:00
|
|
|
|
2012-09-18 15:26:52 +00:00
|
|
|
if "%perl.exe%" == "" (
|
|
|
|
echo Perl not found in PATH. Aborting. >&2
|
|
|
|
exit /b 1
|
|
|
|
)
|
|
|
|
if not exist mkspecs (
|
|
|
|
md mkspecs
|
2012-02-08 10:38:07 +00:00
|
|
|
if errorlevel 1 goto exit
|
|
|
|
)
|
2015-09-18 01:17:40 +00:00
|
|
|
|
|
|
|
rem Extract Qt's version from .qmake.conf
|
|
|
|
for /f "eol=# tokens=1,2,3,4 delims=.= " %%i in (%QTSRC%.qmake.conf) do (
|
|
|
|
if %%i == MODULE_VERSION (
|
|
|
|
set QTVERMAJ=%%j
|
|
|
|
set QTVERMIN=%%k
|
|
|
|
set QTVERPAT=%%l
|
|
|
|
)
|
|
|
|
)
|
|
|
|
set QTVERSION=%QTVERMAJ%.%QTVERMIN%.%QTVERPAT%
|
|
|
|
|
|
|
|
perl %QTSRC%bin\syncqt.pl -minimal -version %QTVERSION% -module QtCore -outdir "%QTDIR%" %QTSRC%
|
2012-09-18 15:26:52 +00:00
|
|
|
if errorlevel 1 goto exit
|
2012-02-08 10:38:07 +00:00
|
|
|
|
|
|
|
if not exist tools\configure (
|
|
|
|
md tools\configure
|
|
|
|
if errorlevel 1 goto exit
|
|
|
|
)
|
|
|
|
cd tools\configure
|
|
|
|
if errorlevel 1 goto exit
|
|
|
|
|
2015-07-15 23:23:51 +00:00
|
|
|
set make=nmake
|
|
|
|
if not "%jom.exe%" == "" set make=jom
|
|
|
|
|
2012-02-08 10:38:07 +00:00
|
|
|
echo #### Generated by configure.bat - DO NOT EDIT! ####> Makefile
|
|
|
|
echo/>> Makefile
|
2015-09-18 01:17:40 +00:00
|
|
|
echo QTVERSION = %QTVERSION%>> Makefile
|
|
|
|
rem These must have trailing spaces to avoid misinterpretation as 5>>, etc.
|
|
|
|
echo QT_VERSION_MAJOR = %QTVERMAJ% >> Makefile
|
|
|
|
echo QT_VERSION_MINOR = %QTVERMIN% >> Makefile
|
|
|
|
echo QT_VERSION_PATCH = %QTVERPAT% >> Makefile
|
2015-07-15 22:44:49 +00:00
|
|
|
if not "%icl.exe%" == "" (
|
|
|
|
echo CXX = icl>>Makefile
|
2016-06-16 22:15:16 +00:00
|
|
|
echo EXTRA_CXXFLAGS = /Qstd=c++11 /Zc:forScope>>Makefile
|
2012-02-08 10:38:07 +00:00
|
|
|
rem This must have a trailing space.
|
|
|
|
echo QTSRC = %QTSRC% >> Makefile
|
|
|
|
set tmpl=win32
|
2015-07-15 22:44:49 +00:00
|
|
|
) else if not "%cl.exe%" == "" (
|
|
|
|
echo CXX = cl>>Makefile
|
|
|
|
echo EXTRA_CXXFLAGS =>>Makefile
|
2012-02-08 10:38:07 +00:00
|
|
|
rem This must have a trailing space.
|
|
|
|
echo QTSRC = %QTSRC% >> Makefile
|
|
|
|
set tmpl=win32
|
2016-07-18 23:41:41 +00:00
|
|
|
) else if not "%clang-cl.exe%" == "" (
|
|
|
|
echo CXX = clang-cl>>Makefile
|
|
|
|
echo EXTRA_CXXFLAGS = -fms-compatibility-version=19.00.23506 -Wno-microsoft-enum-value>>Makefile
|
|
|
|
rem This must have a trailing space.
|
|
|
|
echo QTSRC = %QTSRC% >> Makefile
|
|
|
|
set tmpl=win32
|
2012-02-08 10:38:07 +00:00
|
|
|
) else if not "%g++.exe%" == "" (
|
|
|
|
echo CXX = g++>>Makefile
|
|
|
|
echo EXTRA_CXXFLAGS =>>Makefile
|
|
|
|
rem This must NOT have a trailing space.
|
|
|
|
echo QTSRC = %QTSRC:\=/%>> Makefile
|
|
|
|
set tmpl=mingw
|
|
|
|
set make=mingw32-make
|
|
|
|
) else (
|
|
|
|
echo No suitable compiler found in PATH. Aborting. >&2
|
|
|
|
cd ..\..
|
|
|
|
exit /b 1
|
|
|
|
)
|
|
|
|
echo/>> Makefile
|
|
|
|
type %QTSRC%tools\configure\Makefile.%tmpl% >> Makefile
|
|
|
|
|
|
|
|
%make%
|
|
|
|
if errorlevel 1 (cd ..\.. & exit /b 1)
|
|
|
|
|
|
|
|
cd ..\..
|
|
|
|
|
|
|
|
:conf
|
2016-08-01 10:40:03 +00:00
|
|
|
configure.exe -srcdir %QTSRC% %ARGS%
|
|
|
|
goto exit
|
|
|
|
|
|
|
|
:help
|
|
|
|
type %QTSRC%config_help.txt
|
2012-08-30 10:37:01 +00:00
|
|
|
|
2012-02-08 10:38:07 +00:00
|
|
|
:exit
|