rainyl / opencv_dart

OpenCV bindings for Dart language and Flutter.
https://pub.dev/packages/opencv_dart
Apache License 2.0
78 stars 10 forks source link

Error: CMake 3.18 or higher is required on Linux #109

Closed YancyHsu closed 1 week ago

YancyHsu commented 1 week ago

https://github.com/rainyl/opencv_dart/blob/dcb17be2fa6e26add0f8144ba919d7bfe43972d5/linux/CMakeLists.txt#L4

my system cmake version is : linux cmd>> cmake --version result>> cmake version 3.29.6

but when run this line above, it throws: CMake 3.18 or higher is required. You are running version 3.16.3

i add this line in this CmakeLists.txt, it shows: add in CmakeLists.txt>> message(WARNING "----${CMAKE_VERSION}") result>> ----3.16.3

i cant find what is wrong

YancyHsu commented 1 week ago

add in CmakeLists.txt>> message(WARNING "----${CMAKE_ROOT}") then I got:

----/snap/flutter/145/usr/share/cmake-3.16

so the flutter itself use 3.16

rainyl commented 1 week ago

Download and install flutter manually, do not use snap.

rainyl commented 1 week ago

It requires a minimum cmake verson of 3.18 because file(ARCHIVE_EXTRACT) is only available since 3.18, https://cmake.org/cmake/help/latest/command/file.html#archive-extract

YancyHsu commented 1 week ago

It requires a minimum cmake verson of 3.18 because file(ARCHIVE_EXTRACT) is only available since 3.18, https://cmake.org/cmake/help/latest/command/file.html#archive-extract

get it, tks

rainyl commented 1 week ago

Never mind, I have published v1.0.10+1 with #107 fixed, you can now use it to setup manually if you still want to use snap-installed flutter, remember to set OPENCV_DART_DISABLE_AUTO_BUILD environment variable.

YancyHsu commented 1 week ago

It requires a minimum cmake verson of 3.18 because file(ARCHIVE_EXTRACT) is only available since 3.18, https://cmake.org/cmake/help/latest/command/file.html#archive-extract

it works, and tips tell me install ninja, gtk, pkg-config, clang