2015-11-13 09:07:38 +00:00
|
|
|
set(_proj_name opencv)
|
2015-11-16 11:41:44 +00:00
|
|
|
set(_SB_BINARY_DIR "${SB_BINARY_DIR}/${_proj_name}")
|
2015-11-13 09:07:38 +00:00
|
|
|
|
2021-04-22 15:40:59 +00:00
|
|
|
if (WIN32)
|
|
|
|
set(WIN32_CMAKE_EXTRA_ARGS -DPYTHON3_NUMPY_INCLUDE_DIRS=${PYTHON_HOME}/lib/site-packages/numpy/core/include
|
|
|
|
-DPYTHON3_PACKAGES_PATH=${PYTHON_HOME}/lib/site-packages
|
2021-05-15 17:59:04 +00:00
|
|
|
-DWITH_MSMF=OFF
|
2021-04-22 15:40:59 +00:00
|
|
|
-DOPENCV_LIB_INSTALL_PATH=${SB_INSTALL_DIR}/lib
|
|
|
|
-DOPENCV_BIN_INSTALL_PATH=${SB_INSTALL_DIR}/bin)
|
|
|
|
endif()
|
|
|
|
|
2015-11-13 09:07:38 +00:00
|
|
|
ExternalProject_Add(${_proj_name}
|
|
|
|
PREFIX ${_SB_BINARY_DIR}
|
|
|
|
TMP_DIR ${_SB_BINARY_DIR}/tmp
|
|
|
|
STAMP_DIR ${_SB_BINARY_DIR}/stamp
|
|
|
|
#--Download step--------------
|
|
|
|
DOWNLOAD_DIR ${SB_DOWNLOAD_DIR}
|
2020-10-15 15:22:13 +00:00
|
|
|
URL https://github.com/opencv/opencv/archive/4.5.0.zip
|
2015-11-13 09:07:38 +00:00
|
|
|
#--Update/Patch step----------
|
|
|
|
UPDATE_COMMAND ""
|
|
|
|
#--Configure step-------------
|
|
|
|
SOURCE_DIR ${SB_SOURCE_DIR}/${_proj_name}
|
2015-11-11 18:25:26 +00:00
|
|
|
CMAKE_ARGS
|
|
|
|
-DBUILD_opencv_core=ON
|
|
|
|
-DBUILD_opencv_imgproc=ON
|
|
|
|
-DBUILD_opencv_highgui=ON
|
2015-11-13 13:46:40 +00:00
|
|
|
-DBUILD_opencv_video=ON
|
|
|
|
-DBUILD_opencv_ml=ON
|
|
|
|
-DBUILD_opencv_features2d=ON
|
|
|
|
-DBUILD_opencv_calib3d=ON
|
|
|
|
-DBUILD_opencv_contrib=ON
|
|
|
|
-DBUILD_opencv_flann=ON
|
|
|
|
-DBUILD_opencv_objdetect=ON
|
2015-11-20 12:34:34 +00:00
|
|
|
-DBUILD_opencv_photo=ON
|
2015-11-23 11:23:30 +00:00
|
|
|
-DBUILD_opencv_legacy=ON
|
2021-04-22 15:40:59 +00:00
|
|
|
-DBUILD_opencv_python3=ON
|
|
|
|
-DWITH_FFMPEG=OFF
|
2015-11-11 18:25:26 +00:00
|
|
|
-DWITH_CUDA=OFF
|
2021-04-22 15:40:59 +00:00
|
|
|
-DWITH_GTK=OFF
|
2015-11-11 18:25:26 +00:00
|
|
|
-DWITH_VTK=OFF
|
|
|
|
-DWITH_EIGEN=OFF
|
|
|
|
-DWITH_OPENNI=OFF
|
|
|
|
-DBUILD_EXAMPLES=OFF
|
|
|
|
-DBUILD_TESTS=OFF
|
|
|
|
-DBUILD_PERF_TESTS=OFF
|
|
|
|
-DBUILD_DOCS=OFF
|
|
|
|
-DBUILD_opencv_apps=OFF
|
|
|
|
-DBUILD_opencv_gpu=OFF
|
|
|
|
-DBUILD_opencv_videostab=OFF
|
|
|
|
-DBUILD_opencv_nonfree=OFF
|
|
|
|
-DBUILD_opencv_stitching=OFF
|
|
|
|
-DBUILD_opencv_world=OFF
|
|
|
|
-DBUILD_opencv_superres=OFF
|
|
|
|
-DBUILD_opencv_java=OFF
|
|
|
|
-DBUILD_opencv_ocl=OFF
|
|
|
|
-DBUILD_opencv_ts=OFF
|
2020-02-11 05:06:03 +00:00
|
|
|
-DBUILD_opencv_xfeatures2d=ON
|
2020-10-26 15:01:19 +00:00
|
|
|
-DOPENCV_ALLOCATOR_STATS_COUNTER_TYPE=int64_t
|
2015-11-11 18:25:26 +00:00
|
|
|
-DCMAKE_BUILD_TYPE:STRING=Release
|
2015-11-13 09:07:38 +00:00
|
|
|
-DCMAKE_INSTALL_PREFIX:PATH=${SB_INSTALL_DIR}
|
2021-04-22 15:40:59 +00:00
|
|
|
${WIN32_CMAKE_ARGS}
|
|
|
|
${WIN32_CMAKE_EXTRA_ARGS}
|
2015-11-13 09:07:38 +00:00
|
|
|
#--Build step-----------------
|
|
|
|
BINARY_DIR ${_SB_BINARY_DIR}
|
|
|
|
#--Install step---------------
|
|
|
|
INSTALL_DIR ${SB_INSTALL_DIR}
|
|
|
|
#--Output logging-------------
|
|
|
|
LOG_DOWNLOAD OFF
|
|
|
|
LOG_CONFIGURE OFF
|
|
|
|
LOG_BUILD OFF
|
2016-02-03 12:43:21 +00:00
|
|
|
)
|