-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Expand file tree
/
Copy pathopencv_build_options_slim.cmake
More file actions
44 lines (39 loc) · 2.33 KB
/
Copy pathopencv_build_options_slim.cmake
File metadata and controls
44 lines (39 loc) · 2.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# CMake initial cache for OpenCV slim build (Ubuntu only).
# Used via: cmake -C cmake/opencv_build_options_slim.cmake -S opencv ...
# Platform-specific settings (CMAKE_INSTALL_PREFIX) are passed directly by the workflow.
set(CMAKE_BUILD_TYPE Release CACHE STRING "" FORCE)
set(BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE)
set(ENABLE_CXX11 ON CACHE BOOL "" FORCE)
# Restrict to a minimal module subset.
# OpenCV 5 module renames vs 4.x:
# - calib3d was split into geometry (2D/3D primitives: convexHull, solvePnP,
# findHomography, ...), calib (camera calibration) and stereo (StereoBM/SGBM)
# - features2d was renamed to features
# - barcode was merged into objdetect (no standalone module anymore)
# - CascadeClassifier / HOGDescriptor / groupRectangles moved to the contrib
# xobjdetect module (lightweight: depends only on core/imgproc/imgcodecs/
# features), kept in the slim profile. Pulled from OPENCV_EXTRA_MODULES_PATH.
# - BRISK / KAZE / AKAZE / AGAST / FREAK / BRIEF / DAISY / ... moved to the
# contrib xfeatures2d module. Its required deps (core/imgproc/features/
# geometry) are all in this list and it pulls no heavy external dependency,
# so it is kept in the slim profile too.
# Additional lightweight contrib kept in slim (deps all in this list, no heavy
# external dependency): ximgproc, xphoto, bgsegm, img_hash.
# stitching is dropped from slim (large, niche); the extern is built with
# NO_STITCHING=ON to match.
# Dependencies of whitelisted modules are added automatically.
set(BUILD_LIST "core,imgproc,imgcodecs,geometry,calib,stereo,features,flann,objdetect,photo,ml,video,xobjdetect,xfeatures2d,ximgproc,xphoto,bgsegm,img_hash" CACHE STRING "" FORCE)
# Disable DNN and Protobuf (not needed in slim profile)
set(BUILD_opencv_dnn OFF CACHE BOOL "" FORCE)
set(BUILD_PROTOBUF OFF CACHE BOOL "" FORCE)
set(WITH_PROTOBUF OFF CACHE BOOL "" FORCE)
set(BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
set(BUILD_DOCS OFF CACHE BOOL "" FORCE)
set(BUILD_PERF_TESTS OFF CACHE BOOL "" FORCE)
set(BUILD_TESTS OFF CACHE BOOL "" FORCE)
set(BUILD_JAVA OFF CACHE BOOL "" FORCE)
set(BUILD_opencv_apps OFF CACHE BOOL "" FORCE)
set(WITH_GSTREAMER OFF CACHE BOOL "" FORCE)
set(WITH_FFMPEG OFF CACHE BOOL "" FORCE)
set(WITH_GTK OFF CACHE BOOL "" FORCE)
set(WITH_ADE OFF CACHE BOOL "" FORCE)