setup_vars_win32.cmd.in 823 B

123456789101112131415161718192021222324252627282930313233343536
  1. @ECHO OFF
  2. SET "SCRIPT_DIR=%~dp0"
  3. IF NOT DEFINED OPENCV_QUIET ( ECHO Setting vars for OpenCV @OPENCV_VERSION@ )
  4. SET "PATH=%SCRIPT_DIR%\@OPENCV_LIB_RUNTIME_DIR_RELATIVE_CMAKECONFIG@;%PATH%"
  5. IF NOT DEFINED OPENCV_SKIP_PYTHON CALL :SET_PYTHON
  6. SET SCRIPT_DIR=
  7. IF NOT [%1] == [] GOTO :RUN_COMMAND
  8. GOTO :EOF
  9. :RUN_COMMAND
  10. SET RUN_INTERACTIVE=1
  11. echo %CMDCMDLINE% | find /i "%~0" >nul
  12. IF NOT errorlevel 1 set RUN_INTERACTIVE=0
  13. %*
  14. SET RESULT=%ERRORLEVEL%
  15. IF %RESULT% NEQ 0 (
  16. IF _%RUN_INTERACTIVE%_==_0_ ( IF NOT DEFINED OPENCV_BATCH_MODE ( pause ) )
  17. )
  18. EXIT /B %RESULT%
  19. :SET_PYTHON
  20. SET "PYTHONPATH_OPENCV=%SCRIPT_DIR%\@OPENCV_PYTHON_DIR_RELATIVE_CMAKECONFIG@"
  21. IF NOT DEFINED OPENCV_QUIET ( ECHO Append PYTHONPATH: %PYTHONPATH_OPENCV% )
  22. SET "PYTHONPATH=%PYTHONPATH_OPENCV%;%PYTHONPATH%"
  23. SET PYTHONPATH_OPENCV=
  24. EXIT /B
  25. :EOF