Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
:: setting of the environment variables
set SOURCE_DIR=%~dp0
set BUILD_DIR=%SOURCE_DIR%\build
set INSTALL_DIR=%BUILD_DIR%\install
set VC_VERSION_NUM=11
set VCVARSALL_BAT="C:\Program Files (x86)\Microsoft Visual Studio %VC_VERSION_NUM%.0\VC\vcvarsall.bat"
set ARCH=amd64
set GENERATOR_NAME=Visual Studio %VC_VERSION_NUM% Win64
call %VCVARSALL_BAT% %ARCH%
mkdir build
cd build
:: runnig CMake
cmake.exe ^
-G "%GENERATOR_NAME%" ^
--build "%BUILD_DIR%" ^
-D BUILD_CUDA_STUBS=OFF ^
-D BUILD_DOCS=OFF ^
-D BUILD_EXAMPLES=OFF ^
-D BUILD_JASPER=ON ^
-D BUILD_JPEG=ON ^
-D BUILD_OPENEXR=ON ^
-D BUILD_PACKAGE=ON ^
-D BUILD_PERF_TESTS=OFF ^
-D BUILD_PNG=ON ^
-D BUILD_SHARED_LIBS=ON ^
-D BUILD_TBB=OFF ^
-D BUILD_TESTS=OFF ^
-D BUILD_TIFF=ON ^
-D BUILD_WITH_DEBUG_INFO=ON ^
-D BUILD_WITH_STATIC_CRT=ON ^
-D BUILD_ZLIB=ON ^
-D BUILD_WEBP=ON ^
-D BUILD_opencv_apps=ON ^
-D BUILD_opencv_calib3d=ON ^
-D BUILD_opencv_core=ON ^
-D BUILD_opencv_cudaarithm=ON ^
-D BUILD_opencv_cudabgsegm=ON ^
-D BUILD_opencv_cudacodec=OFF ^
-D BUILD_opencv_cudafeatures2d=ON ^
-D BUILD_opencv_cudafilters=ON ^
-D BUILD_opencv_cudaimgproc=ON ^
-D BUILD_opencv_cudalegacy=ON ^
-D BUILD_opencv_cudaobjdetect=ON ^
-D BUILD_opencv_cudaoptflow=ON ^
-D BUILD_opencv_cudastereo=ON ^
-D BUILD_opencv_cudawarping=ON ^
-D BUILD_opencv_cudev=ON ^
-D BUILD_opencv_features2d=ON ^
-D BUILD_opencv_flann=ON ^
-D BUILD_opencv_hal=ON ^
-D BUILD_opencv_highgui=ON ^
-D BUILD_opencv_imgcodecs=ON ^
-D BUILD_opencv_imgproc=ON ^
-D BUILD_opencv_java=OFF ^
-D BUILD_opencv_ml=ON ^
-D BUILD_opencv_objdetect=ON ^
-D BUILD_opencv_photo=ON ^
-D BUILD_opencv_python2=OFF ^
-D BUILD_opencv_python3=ON ^
-D BUILD_opencv_shape=ON ^
-D BUILD_opencv_stitching=ON ^
-D BUILD_opencv_superres=ON ^
-D BUILD_opencv_ts=ON ^
-D BUILD_opencv_video=ON ^
-D BUILD_opencv_videoio=ON ^
-D BUILD_opencv_videostab=ON ^
-D BUILD_opencv_viz=OFF ^
-D BUILD_opencv_world=OFF ^
-D CMAKE_CONFIGURATION_TYPES="Debug;Release" ^
-D CMAKE_INSTALL_PREFIX="%INSTALL_DIR%" ^
-D EIGEN_INCLUDE_PATH="C:/dev/eigen-3.2.2/build/install/include/eigen3" ^
-D TBB_INCLUDE_DIR="C:/dev/tbb43_20150209oss/include" ^
-D CUDA_ARCH_BIN="3.0" ^
-D CUDA_ARCH_PTX="" ^
-D WITH_1394=OFF ^
-D WITH_CUBLAS=ON ^
-D WITH_CUDA=ON ^
-D WITH_CUFFT=ON ^
-D WITH_DIRECTX=ON ^
-D WITH_DSHOW=ON ^
-D WITH_EIGEN=ON ^
-D WITH_FFMPEG=ON ^
-D WITH_GDAL=OFF ^
-D WITH_GIGEAPI=OFF ^
-D WITH_INTELPERC=OFF ^
-D WITH_IPP=ON ^
-D WITH_IPP_A=OFF ^
-D WITH_JASPER=ON ^
-D WITH_JPEG=ON ^
-D WITH_MSMF=ON ^
-D WITH_NVCUVID=OFF ^
-D WITH_OPENCL=ON ^
-D WITH_OPENCLAMDBLAS=OFF ^
-D WITH_OPENCLAMDFFT=OFF ^
-D WITH_OPENCL_SVM=ON ^
-D WITH_OPENEXR=ON ^
-D WITH_OPENGL=OFF ^
-D WITH_OPENMP=OFF ^
-D WITH_OPENNI=OFF ^
-D WITH_OPENNI2=OFF ^
-D WITH_PNG=ON ^
-D WITH_PVAPI=OFF ^
-D WITH_QT=OFF ^
-D WITH_TBB=ON ^
-D WITH_TIFF=ON ^
-D WITH_VFW=OFF ^
-D WITH_VTK=OFF ^
-D WITH_WEBP=ON ^
-D WITH_WIN32UI=ON ^
-D WITH_XIMEA=OFF %SOURCE_DIR%
:: Building the OpenCV(Debug/Release) using Visual Studio
devenv /build "Debug|x64" /project "INSTALL" OpenCV.sln
devenv /build "Release|x64" /project "INSTALL" OpenCV.sln
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.