Skip to content

Commit

Permalink
Merge pull request #286 from rainyl/hide-highgui
Browse files Browse the repository at this point in the history
hide highgui from building, cache options
  • Loading branch information
rainyl authored Nov 4, 2024
2 parents acc808f + 54cca7b commit dfe31bd
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 66 deletions.
14 changes: 1 addition & 13 deletions packages/opencv_core/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -70,19 +70,7 @@ android {
cmake {
arguments "-DANDROID_ARM_NEON=TRUE",
"-DANDROID_STL=c++_static",
"-DCMAKE_INSTALL_PREFIX=$SOURCE_DIR/src/main/jniLibs",
"-DDARTCV_WITH_CALIB3D=ON",
"-DDARTCV_WITH_CONTRIB=ON",
"-DDARTCV_WITH_DNN=ON",
"-DDARTCV_WITH_FEATURE2D=ON",
"-DDARTCV_WITH_HIGHGUI=ON",
"-DDARTCV_WITH_IMGPROC=ON",
"-DDARTCV_WITH_OBJDETECT=ON",
"-DDARTCV_WITH_PHOTO=ON",
"-DDARTCV_WITH_STITCHING=ON",
"-DDARTCV_WITH_VIDEO=ON",
"-DDARTCV_WITH_VIDEOIO=ON",
"-DDARTCV_WITH_GAPI=OFF"
"-DCMAKE_INSTALL_PREFIX=$SOURCE_DIR/src/main/jniLibs"
}
}

Expand Down
27 changes: 13 additions & 14 deletions packages/opencv_core/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,20 @@ if(ANDROID AND(DEFINED ANDROID_ABI))
endif()
endif()

set(DARTCV_WITH_CALIB3D ON)
set(DARTCV_WITH_CONTRIB ON)
set(DARTCV_WITH_DNN ON)
set(DARTCV_WITH_FEATURE2D ON)
set(DARTCV_WITH_HIGHGUI OFF)
set(DARTCV_WITH_IMGPROC ON)
set(DARTCV_WITH_OBJDETECT ON)
set(DARTCV_WITH_PHOTO ON)
set(DARTCV_WITH_STITCHING ON)
set(DARTCV_WITH_VIDEO ON)
set(DARTCV_WITH_VIDEOIO OFF)
set(DARTCV_WITH_GAPI OFF)
set(DARTCV_WORLD OFF)
set(DARTCV_WITH_CALIB3D ON CACHE BOOL "Enable OpenCV calib3d module" FORCE)
set(DARTCV_WITH_CONTRIB ON CACHE BOOL "Enable OpenCV contrib module" FORCE)
set(DARTCV_WITH_DNN ON CACHE BOOL "Enable OpenCV dnn module" FORCE)
set(DARTCV_WITH_FEATURE2D ON CACHE BOOL "Enable OpenCV feature2d module" FORCE)
set(DARTCV_WITH_HIGHGUI OFF CACHE BOOL "Enable OpenCV highgui module" FORCE)
set(DARTCV_WITH_IMGPROC ON CACHE BOOL "Enable OpenCV imgproc module" FORCE)
set(DARTCV_WITH_OBJDETECT ON CACHE BOOL "Enable OpenCV objdetect module" FORCE)
set(DARTCV_WITH_PHOTO ON CACHE BOOL "Enable OpenCV photo module" FORCE)
set(DARTCV_WITH_STITCHING ON CACHE BOOL "Enable OpenCV stitching module" FORCE)
set(DARTCV_WITH_VIDEO ON CACHE BOOL "Enable OpenCV video module")
set(DARTCV_WITH_VIDEOIO OFF CACHE BOOL "Enable OpenCV videoio module" FORCE)
set(DARTCV_WITH_GAPI OFF CACHE BOOL "Enable OpenCV gapi module" FORCE)
set(DARTCV_WORLD OFF CACHE BOOL "Enable OpenCV world module" FORCE)

# TODO: read opencv_version from pubspec.yaml
set(OPENCV_VERSION "${_version_opencv}")
set(DARTCV_DISABLE_DOWNLOAD_OPENCV OFF)

Expand Down
14 changes: 1 addition & 13 deletions packages/opencv_dart/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -67,19 +67,7 @@ android {
cmake {
arguments "-DANDROID_ARM_NEON=TRUE",
"-DANDROID_STL=c++_static",
"-DCMAKE_INSTALL_PREFIX=$SOURCE_DIR/src/main/jniLibs",
"-DDARTCV_WITH_CALIB3D=ON",
"-DDARTCV_WITH_CONTRIB=ON",
"-DDARTCV_WITH_DNN=ON",
"-DDARTCV_WITH_FEATURE2D=ON",
"-DDARTCV_WITH_HIGHGUI=ON",
"-DDARTCV_WITH_IMGPROC=ON",
"-DDARTCV_WITH_OBJDETECT=ON",
"-DDARTCV_WITH_PHOTO=ON",
"-DDARTCV_WITH_STITCHING=ON",
"-DDARTCV_WITH_VIDEO=ON",
"-DDARTCV_WITH_VIDEOIO=ON",
"-DDARTCV_WITH_GAPI=OFF"
"-DCMAKE_INSTALL_PREFIX=$SOURCE_DIR/src/main/jniLibs"
}
}

Expand Down
24 changes: 12 additions & 12 deletions packages/opencv_dart/images/opencv_dart_size_report.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 13 additions & 14 deletions packages/opencv_dart/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,20 @@ if(ANDROID AND(DEFINED ANDROID_ABI))
endif()
endif()

set(DARTCV_WITH_CALIB3D ON)
set(DARTCV_WITH_CONTRIB ON)
set(DARTCV_WITH_DNN ON)
set(DARTCV_WITH_FEATURE2D ON)
set(DARTCV_WITH_HIGHGUI ON)
set(DARTCV_WITH_IMGPROC ON)
set(DARTCV_WITH_OBJDETECT ON)
set(DARTCV_WITH_PHOTO ON)
set(DARTCV_WITH_STITCHING ON)
set(DARTCV_WITH_VIDEO ON)
set(DARTCV_WITH_VIDEOIO ON)
set(DARTCV_WITH_GAPI OFF)
set(DARTCV_WORLD OFF)
set(DARTCV_WITH_CALIB3D ON CACHE BOOL "Enable OpenCV calib3d module" FORCE)
set(DARTCV_WITH_CONTRIB ON CACHE BOOL "Enable OpenCV contrib module" FORCE)
set(DARTCV_WITH_DNN ON CACHE BOOL "Enable OpenCV dnn module" FORCE)
set(DARTCV_WITH_FEATURE2D ON CACHE BOOL "Enable OpenCV feature2d module" FORCE)
set(DARTCV_WITH_HIGHGUI OFF CACHE BOOL "Enable OpenCV highgui module" FORCE)
set(DARTCV_WITH_IMGPROC ON CACHE BOOL "Enable OpenCV imgproc module" FORCE)
set(DARTCV_WITH_OBJDETECT ON CACHE BOOL "Enable OpenCV objdetect module" FORCE)
set(DARTCV_WITH_PHOTO ON CACHE BOOL "Enable OpenCV photo module" FORCE)
set(DARTCV_WITH_STITCHING ON CACHE BOOL "Enable OpenCV stitching module" FORCE)
set(DARTCV_WITH_VIDEO ON CACHE BOOL "Enable OpenCV video module")
set(DARTCV_WITH_VIDEOIO ON CACHE BOOL "Enable OpenCV videoio module" FORCE)
set(DARTCV_WITH_GAPI OFF CACHE BOOL "Enable OpenCV gapi module" FORCE)
set(DARTCV_WORLD OFF CACHE BOOL "Enable OpenCV world module" FORCE)

# TODO: read opencv_version from pubspec.yaml
set(OPENCV_VERSION "${_version_opencv}")
set(DARTCV_DISABLE_DOWNLOAD_OPENCV OFF)

Expand Down

0 comments on commit dfe31bd

Please sign in to comment.