carla/Util/BuildTools/BuildOSM2ODR.bat

42 lines
1.4 KiB
Batchfile
Raw Normal View History

@echo off
setlocal enabledelayedexpansion
rem BAT script that creates the library for conversion from OSM to OpenDRIVE (carla.org).
rem Run it through a cmd with the x64 Visual C++ Toolset enabled.
set LOCAL_PATH=%~dp0
set FILE_N=-[%~n0]:
rem Print batch params (debug purpose)
echo %FILE_N% [Batch params]: %*
rem ============================================================================
rem -- Parse arguments ---------------------------------------------------------
rem ============================================================================
rem ============================================================================
rem -- Local Variables ---------------------------------------------------------
rem ============================================================================
rem Set the visual studio solution directory
rem
2020-07-28 16:41:28 +08:00
set OSM2ODR_VSPROJECT_PATH=%INSTALLATION_DIR:/=\%osm2odr-visualstudio\
set OSM2ODR_INSTALL_PATH=%ROOT_PATH:/=\%PythonAPI\carla\dependencies\
if "%1"=="--rebuild" (
2020-07-28 16:41:28 +08:00
rmdir "%OSM2ODR_VSPROJECT_PATH%" /s /q
)
2020-07-28 16:41:28 +08:00
if not exist "%OSM2ODR_VSPROJECT_PATH%" mkdir "%OSM2ODR_VSPROJECT_PATH%"
cd "%OSM2ODR_VSPROJECT_PATH%"
cmake -G "Visual Studio 15 2017 Win64"^
-DCMAKE_CXX_FLAGS_RELEASE="/MD /MP"^
2020-07-28 16:41:28 +08:00
-DCMAKE_INSTALL_PREFIX="%OSM2ODR_INSTALL_PATH:\=/%"^
"%ROOT_PATH%\Util\OSM2ODR"
cmake --build . --config Release --target install | findstr /V "Up-to-date:"
endlocal
exit /b 0