forked from M17-Project/m17-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwin_build.bat
More file actions
61 lines (49 loc) · 1.29 KB
/
win_build.bat
File metadata and controls
61 lines (49 loc) · 1.29 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
::
:: win_build.bat
::
:: Batch file to locally build under Windows using Conda
::
:: See README.md for details
::
setlocal EnableDelayedExpansion
@echo on
:: Set number of CPUs to use for build
set CPU_COUNT=3
:: Build RtAudio
cd thirdparty/rtaudio
:: Make a build folder and change to it
mkdir build
cd build
:: configure
cmake -G "Ninja" ^
-DCMAKE_BUILD_TYPE:STRING=Release ^
-DCMAKE_INSTALL_PREFIX:PATH="%LIBRARY_PREFIX%" ^
-DCMAKE_PREFIX_PATH:PATH="%LIBRARY_PREFIX%" ^
..
if errorlevel 1 exit /B 1
:: build
cmake --build . --config Release -- -j%CPU_COUNT%
if errorlevel 1 exit /B 1
:: install
IF [%LIBRARY_PREFIX%] == [] (copy rtaudio.dll %CD:~0,3%\bin\) ELSE (copy rtaudio.dll %LIBRARY_PREFIX%\bin\)
::go back to m17-tools
cd ../../../
:: Make a build folder and change to it
mkdir build
cd build
:: configure
cmake -G "Ninja" ^
-DCMAKE_BUILD_TYPE:STRING=Release ^
-DCMAKE_INSTALL_PREFIX:PATH="%LIBRARY_PREFIX%" ^
-DCMAKE_PREFIX_PATH:PATH="%LIBRARY_PREFIX%" ^
..
if errorlevel 1 exit /B 1
:: build
cmake --build . --config Release -- -j%CPU_COUNT%
if errorlevel 1 exit /B 1
:: install
cmake --build . --config Release --target install
if errorlevel 1 exit /B 1
:: test
ctest --build-config Release --output-on-failure --timeout 120 -j%CPU_COUNT%
if errorlevel 1 exit /B 1