-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild-LsCs-windows.bat
More file actions
66 lines (59 loc) · 2.01 KB
/
build-LsCs-windows.bat
File metadata and controls
66 lines (59 loc) · 2.01 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
@echo off
REM build-LsCs-windows.bat
REM
set srcDir=%CD%
ECHO Must be run from root of project directory
ECHO ******** Cannot be run from regular Command window
ECHO must be run in a Visual Studio Developer Command prompt to get
ECHO all of the needed environment variables.
ECHO
ECHO
ECHO Build will create new ..\LsCs-build directory to execute build in
ECHO and ..\LsCs-release directory to install library and header files
ECHO
ECHO ****
ECHO use -skip command line parameter to skip styling source code
ECHO ****
ECHO
ECHO ******
ECHO ****** NOTE: You need to change value of VCPKG_TARGET_TRIPLET to
ECHO ****** build anything other than x64-windows
ECHO ******
if exist "..\LsCs-build" rmdir /S /Q "..\LsCs-build"
if exist "..\LsCs-release" rmdir /S /Q "..\LsCs-release"
if exist "..\LsCs-build" ECHO "You must rmdir /s /q ..\LsCs-build prior to running ; cd %srcDir% ; exit
if /I "%1" == "-skip" goto CREATEDIRS
ECHO Enforcing style
ECHO
call astyle-project.bat
ECHO
:CREATEDIRS
ECHO Creating empty build directories
ECHO
mkdir ..\LsCs-build
mkdir ..\LsCs-release
ECHO
ECHO Building libraries and packages
ECHO
ECHO ************************************************************************
ECHO ***** NOTE: the VCPKG step is very sensitive to your Internet
ECHO ***** connection and the habit of some antivirus packages to
ECHO ***** always eat the first download request. If it fails you
ECHO ***** should see something like
ECHO *****
ECHO ***** openssl does not exist
ECHO *****
ECHO ***** in the lines below. Check your Internet
ECHO ***** and re-run. Think about getting a better antivirus product as well.
ECHO *****
ECHO ************************************************************************
ECHO
cd ..\LsCs-build
cmake -G "Ninja" -DCMAKE_TOOLCHAIN_FILE="%VCPKG_ROOT%"\scripts\buildsystems\vcpkg.cmake^
-DVCPKG_TARGET_TRIPLET=x64-windows^
-DCMAKE_BUILD_TYPE=Release^
-DCMAKE_INSTALL_PREFIX=..\LsCs-release "%srcDir%"
ECHO
ninja
ninja install
cd %srcDir%