CARVIEW |
Navigation Menu
-
-
Notifications
You must be signed in to change notification settings - Fork 56.2k
Add experimental support for Apple VisionOS platform #24136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Build command for testing visionos support:
|
@komakai Great job! Thanks a lot for the patch! |
CMakeLists.txt
Outdated
VERIFY HAVE_JASPER) | ||
OCV_OPTION(WITH_OPENJPEG "Include JPEG2K support (OpenJPEG)" ON | ||
VISIBLE_IF NOT IOS | ||
VISIBLE_IF NOT IOS AND NOT VISIONOS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see a lot of IOS AND VISIONOS
in pair. Is there a united variable for all? Like this:
OCV_OPTION(WITH_OPENJPEG "Include JPEG2K support (OpenJPEG)" ON
VISIBLE_IF NOT APPLE
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
APPLE also includes macOS
I guess we could make something like APPLE_DEVICE but I feel like the names IOS and VISIONOS are going to be easier to understand for maintainers
e47aa4a
to
004a910
Compare
Converting to draft until the necessary changes to cmake are released |
VisionOS added in CMake 3.28 release: https://cmake.org/cmake/help/latest/release/3.28.html |
VisionOS support is not complete in CMake for now: https://gitlab.kitware.com/cmake/cmake/-/issues/25266 |
I will try to build this PR with CMake-3.28.0-rc4 when I have a minute and check if it builds OK |
Could build with CMake from https://github.com/Kitware/CMake/releases/download/v3.28.0-rc4/cmake-3.28.0-rc4-macos-universal.dmg with the below change:
However for visionOS CMake does not have an equivalent define in visionOS-Initialize.cmake so I added a define XROS to Toolchain-XROS_Xcode.cmake and Toolchain-XRSimulator_Xcode.cmake which is effectly equal to VISIONOS or VISIONSIMULATOR and updated all the cmake files to use this define instead of VISIONOS |
To test this I was able to create a VisionOS project and add the OpenCV framework and add some simple calls to create a Mat and do some operations on the Mat. I could see that the code built OK but I don't have a device and the latest VisionOS simulator only runs on Apple Silicon so I could not actually run the code. |
Hi. Build command: Tools versions:
With framework from |
Did I miss something to get a successful build? I tested with:
and both commands:
but only got errors:
|
Looks like xcode 15.0.1 doesn't support VisionOS (link) |
Ok, thanks. Let me try with xcode beta then. Do you know how to configure CMake to use Xcode beta? I have installed Xcode 15.1 beta but CMake still complains |
Use xcode-select to select the beta-version - then CMake will use that version |
Thank you for the instructions. I can confirm that build can be done successfully with cmake-3.28.0-rc5 and Xcode-15.1-beta and command cc @asmorkalov |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
π
@komakai I'm getting:
with: that if statement seems to be within |
Yes that sounds completely reasonable. I look forward to your Pull Request |
Add experimental support for Apple VisionOS platform opencv#24136 ### Pull Request Readiness Checklist See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request - [x] I agree to contribute to the project under Apache 2 License. - [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV - [x] The PR is proposed to the proper branch This is dependent on cmake support for VisionOs which is currently in progress. Creating PR now to test that there are no regressions in iOS and macOS builds
Pull Request Readiness Checklist
See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
This is dependent on cmake support for visionos which is currently in progress.
Creating PR now to test that there are no regressions in iOS and macOS builds