1 @rem # SPDX-License-Identifier: 0BSD
\r
2 @rem # Author: Lasse Collin
\r
4 @rem ########################################################################
\r
6 @rem # This builds XZ Utils with CMake + MinGW-w64 (GCC or Clang/LLVM).
\r
7 @rem # See INSTALL-MinGW-w64_with_CMake.txt for detailed instructions.
\r
9 @rem # Summary of command line arguments:
\r
11 @rem # %1 = Path to CMake's bin directory. Example:
\r
12 @rem # C:\devel\cmake\bin
\r
14 @rem # %2 = Path to MinGW-w64's bin directory. Example:
\r
15 @rem # C:\devel\mingw64\bin
\r
17 @rem # %3 = ON or OFF: Set to ON to build liblzma.dll or OFF for
\r
18 @rem # static liblzma.a. With OFF, the *.exe files won't
\r
19 @rem # depend on liblzma.dll.
\r
21 @rem ########################################################################
\r
24 set PATH=%1;%2;%PATH%
\r
29 cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release -DENABLE_NLS=OFF -DBUILD_SHARED_LIBS=%3 ..\.. || exit /b
\r
30 mingw32-make || exit /b
\r
31 mingw32-make test || exit /b
\r
33 @rem liblzma.dll might not exist so ignore errors.
\r
34 strip xz.exe xzdec.exe lzmadec.exe lzmainfo.exe liblzma.dll
\r