-
Notifications
You must be signed in to change notification settings - Fork 43
/
build.cmd
74 lines (64 loc) · 1.84 KB
/
build.cmd
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
67
68
69
70
71
72
73
@echo on
setlocal enableextensions
if "%1" == "" (
echo Usage: build.cmd [ide^|cli]
echo.
echo Build script for radar_pi
echo -------------------------
echo.
echo This script is intended for use by @canboat, @hakansv and @douwefokkema only.
echo We use it to set preconditions on our build machines to run in IDE.
echo.
echo Any others: use at own risk.
echo.
echo Feel free to adapt this to your own situation.
echo.
goto :EOF
)
set "BUILD_TYPE=%1"
set "BUILDDIR=rel-%COMPUTERNAME%"
set "STATE=Unofficial"
set "TARGET=pkg"
set "CMAKE_OPTIONS="
set "MAKE_OPTIONS="
set "CMAKE_BUILD_PARALLEL_LEVEL=2"
rem On Windows, ide means Visual Studio
if "%BUILD_TYPE%" == "ide" (
set "BUILDDIR=%BUILDDIR%-vs"
)
if "%COMPUTERNAME%" == "PVW10X64" (
rem Adapt for Kees VM on kees-mbp
set "WXWIN=Y:\src\wx312_win32"
call :setup_kees
) else if "%COMPUTERNAME%" == "W7" (
rem Adapt for Kees VM on kees-mbp
set "WXWIN=E:\src\wx312_win32"
call :setup_kees
) else if "%COMPUTERNAME%" == "HakansV" (
rem This is an example
)
if exist "%BUILDDIR%" (
rmdir /s/q "%BUILDDIR%"
)
mkdir "%BUILDDIR%"
cd "%BUILDDIR%"
cmake -T v141_xp -G "Visual Studio 15 2017" --config Debug -DBUILD_TYPE="%BUILD_TYPE%" %CMAKE_OPTIONS% ..
if errorlevel 1 goto :EOF
if "%BUILD_TYPE%" == "ide" (
start radar_pi.sln
) else (
dir
cmake --build .
)
goto :EOF
:setup_kees
set "PATH=C:\Windows\system32;C:\windows"
set "PATH=%PATH%;c:\Program Files (x86)\nasm"
set "PATH=%PATH%;C:\Program Files (x86)\poedit\gettexttools\bin"
set "PATH=%PATH%;C:\Program Files\cmake\bin"
set "PATH=%PATH%;C:\Python36;c:\Python36\Scripts"
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars32.bat"
set "wxWidgets_ROOT_DIR=%WXWIN%"
set "wxWidgets_LIB_DIR=%WXWIN%\lib\vc_dll"
set "PATH=%PATH%;%WXWIN%;%wxWidgets_LIB_DIR%"
goto :EOF