-
Notifications
You must be signed in to change notification settings - Fork 1
/
build-win32.bat
41 lines (30 loc) · 1001 Bytes
/
build-win32.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
:: Copyright 2017 <chaishushan{AT}gmail.com>. All rights reserved.
:: Use of this source code is governed by a BSD-style
:: license that can be found in the LICENSE file.
setlocal
cd %~dp0
:: ----------------------------------------------------------------------------
:: Setup MSVC
:: VS2015
if not "x%VS140COMNTOOLS%" == "x" (
echo Setup VS2015 Win64 ...
call "%VS140COMNTOOLS%\..\..\VC\vcvarsall.bat"
goto build
)
:build
:: -----------------------------------------------------------------------------
mkdir zz_build_win32_release
cd zz_build_win32_release
cmake ..^
-G "NMake Makefiles"^
-DCMAKE_INSTALL_PREFIX=..^
-DCMAKE_BUILD_TYPE=release^
^
-DCMAKE_MODULE_LINKER_FLAGS="/machine:x86"^
-DCMAKE_SHARED_LINKER_FLAGS="/machine:x86"^
-DCMAKE_STATIC_LINKER_FLAGS="/machine:x86"^
-DCMAKE_EXE_LINKER_FLAGS="/MACHINE:x86"
nmake install
cd ..
:: -----------------------------------------------------------------------------
:end