mirror of
https://github.com/opencv/opencv.git
synced 2024-11-24 11:10:21 +08:00
samples: prefer CMake from MSVS
MSVS is shipped with CMake compoment.
This commit is contained in:
parent
2b3c7490d5
commit
de8024ce4a
@ -38,26 +38,6 @@ echo ===========================================================================
|
||||
:: Path to FFMPEG binary files
|
||||
set "PATH=!PATH!;!SCRIPTDIR!\..\..\build\bin\"
|
||||
|
||||
:: Detect CMake
|
||||
cmake --version >NUL 2>NUL
|
||||
if !ERRORLEVEL! EQU 0 (
|
||||
set CMAKE_FOUND=1
|
||||
) else (
|
||||
if exist "C:\Program Files\CMake\bin" (
|
||||
set "PATH=!PATH!;C:\Program Files\CMake\bin"
|
||||
cmake --version >NUL 2>NUL
|
||||
if !ERRORLEVEL! EQU 0 (
|
||||
set CMAKE_FOUND=1
|
||||
)
|
||||
)
|
||||
)
|
||||
if NOT DEFINED CMAKE_FOUND (
|
||||
set "MSG=CMake is required to build OpenCV samples. Download it from here: https://cmake.org/download/ and install into 'C:\Program Files\CMake'"
|
||||
goto die
|
||||
) else (
|
||||
echo CMake is detected
|
||||
)
|
||||
|
||||
:: Detect compiler
|
||||
cl /? >NUL 2>NUL <NUL
|
||||
if !ERRORLEVEL! NEQ 0 (
|
||||
@ -87,6 +67,27 @@ if !ERRORLEVEL! NEQ 0 (
|
||||
)
|
||||
)
|
||||
|
||||
:: Detect CMake
|
||||
cmake --version >NUL 2>NUL
|
||||
if !ERRORLEVEL! EQU 0 (
|
||||
set CMAKE_FOUND=1
|
||||
) else (
|
||||
if exist "C:\Program Files\CMake\bin" (
|
||||
set "PATH=!PATH!;C:\Program Files\CMake\bin"
|
||||
cmake --version >NUL 2>NUL
|
||||
if !ERRORLEVEL! EQU 0 (
|
||||
set CMAKE_FOUND=1
|
||||
)
|
||||
)
|
||||
)
|
||||
if NOT DEFINED CMAKE_FOUND (
|
||||
set "MSG=CMake is required to build OpenCV samples. Download it from here: https://cmake.org/download/ and install into 'C:\Program Files\CMake'"
|
||||
goto die
|
||||
) else (
|
||||
call :execute cmake --version
|
||||
echo CMake is detected
|
||||
)
|
||||
|
||||
:: Detect available MSVS version
|
||||
if NOT DEFINED VisualStudioVersion (
|
||||
set "MSG=Can't determine MSVS version. 'VisualStudioVersion' is not defined"
|
||||
|
Loading…
Reference in New Issue
Block a user