| 1 |
@rem ------------------------------------------------------------------------------ |
| 2 |
@rem Copyright (C) Intel Corporation |
| 3 |
@rem |
| 4 |
@rem SPDX-License-Identifier: MIT |
| 5 |
@rem ------------------------------------------------------------------------------ |
| 6 |
@rem Install the product. |
| 7 |
@rem |
| 8 |
@rem If argument is provided then it will be interpreted as the install prefix. If |
| 9 |
@rem called without arguments then installation will be to `VPL_INSTALL_DIR` if |
| 10 |
@rem defined or system default location otherwise. |
| 11 |
|
| 12 |
|
| 13 |
@echo off |
| 14 |
setlocal ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION |
| 15 |
|
| 16 |
for %%Q in ("%~dp0\.") DO set "script_dir=%%~fQ" |
| 17 |
pushd %script_dir%\.. |
| 18 |
set "source_dir=%cd%" |
| 19 |
popd |
| 20 |
set "build_dir=%source_dir%\_build" |
| 21 |
|
| 22 |
if [%1]==[] goto no_args |
| 23 |
:: use first argument as install prefix |
| 24 |
cmake --install "%build_dir%" --config Release --strip --prefix "%1" |
| 25 |
goto done |
| 26 |
:no_args |
| 27 |
if DEFINED VPL_INSTALL_DIR ( |
| 28 |
:: no argument but env variable was provided, install to VPL_INSTALL_DIR |
| 29 |
cmake --install "%build_dir%" --config Release --strip --prefix "%VPL_INSTALL_DIR%" |
| 30 |
) else ( |
| 31 |
:: no argument or env variable defined, use system default install location |
| 32 |
cmake --install "%build_dir%" --config Release --strip |
| 33 |
) |
| 34 |
:done |
| 35 |
|
| 36 |
endlocal |