-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild_windows.bat
More file actions
75 lines (63 loc) · 1.68 KB
/
Copy pathbuild_windows.bat
File metadata and controls
75 lines (63 loc) · 1.68 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
67
68
69
70
71
72
73
74
75
@echo off
REM SuperVINS Windows Build Script
REM Dependencies are in C:\ThirdParty
REM Usage: build_windows.bat [ONNXRUNTIME_ROOTDIR]
setlocal enabledelayedexpansion
echo ========================================
echo SuperVINS Windows Build Script
echo ========================================
echo Third-Party Libs: C:\ThirdParty
echo.
REM Check if ONNXRUNTIME_ROOTDIR is provided
if "%1"=="" (
if "%ONNXRUNTIME_ROOTDIR%"=="" (
echo ERROR: ONNXRUNTIME_ROOTDIR not set!
echo Usage: build_windows.bat ^<path_to_onnxruntime^>
echo Or set environment variable: set ONNXRUNTIME_ROOTDIR=^<path^>
exit /b 1
)
set ONNX_DIR=%ONNXRUNTIME_ROOTDIR%
) else (
set ONNX_DIR=%1
)
echo ONNX Runtime: %ONNX_DIR%
echo.
REM Create build directory
if not exist build (
mkdir build
)
cd build
echo Configuring CMake...
cmake .. -G "Visual Studio 16 2019" -A x64 ^
-DCMAKE_BUILD_TYPE=Release ^
-DONNXRUNTIME_ROOTDIR="%ONNX_DIR%"
if errorlevel 1 (
echo.
echo ERROR: CMake configuration failed!
echo Please ensure all dependencies are installed.
echo See BUILD.md for instructions.
cd ..
exit /b 1
)
echo.
echo Building SuperVINS...
cmake --build . --config Release
if errorlevel 1 (
echo.
echo ERROR: Build failed!
cd ..
exit /b 1
)
echo.
echo ========================================
echo Build Successful!
echo ========================================
echo Executable: build\Release\supervins.exe
echo.
echo Usage:
echo build\Release\supervins.exe ^<config_file^> ^<data_directory^>
echo.
echo Example:
echo build\Release\supervins.exe config\euroc\euroc_mono_imu_config.yaml C:\data\EUROC\V2_01_easy\mav0
echo.
cd ..