Water's Home

Just another Life Style

0%

How to Build Qt From Source Codes (QT 5.12 + Visual Studio 2017)

msvc-desktop.conf

C:\Qt\5.12.0\Src\qtbase\mkspecs\common\msvc-desktop.conf

QMAKE_CFLAGS_RELEASE = $QMAKE_CFLAGS_OPTIMIZE -MT
QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += $QMAKE_CFLAGS_OPTIMIZE -Zi -MT
QMAKE_CFLAGS_DEBUG = -Zi -MTd

qt5vars.cmd

REM Set up \Microsoft Visual Studio 2017, where arch is \c amd64, \c x86, etc.
CALL “C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvarsall.bat” x86
SET _ROOT=C:\Qt\5.12.0\Src
SET PATH=%_ROOT%\qtbase\bin;%_ROOT%\gnuwin32\bin;%PATH%
REM Uncomment the below line when using a git checkout of the source repository
REM SET PATH=%_ROOT%\qtrepotools\bin;%PATH%
SET _ROOT=

make & make install

C:\Qt\5.12.0\Src>qt5vars.cmd
C:\Qt\5.12.0\Src>configure -opensource -confirm-license
C:\Qt\5.12.0\Src>jom -j 8
C:\Qt\5.12.0\Src>jom install