@@ -238,9 +238,9 @@ OCV_OPTION(BUILD_ITT "Build Intel ITT from source"
238
238
# Optional 3rd party components
239
239
# ===================================================
240
240
OCV_OPTION(WITH_1394 "Include IEEE1394 support" ON
241
- VISIBLE_IF NOT ANDROID AND NOT IOS AND NOT WINRT
241
+ VISIBLE_IF NOT ANDROID AND NOT IOS AND NOT XROS AND NOT WINRT
242
242
VERIFY HAVE_DC1394_2)
243
- OCV_OPTION(WITH_AVFOUNDATION "Use AVFoundation for Video I/O (iOS/Mac)" ON
243
+ OCV_OPTION(WITH_AVFOUNDATION "Use AVFoundation for Video I/O (iOS/visionOS/ Mac)" ON
244
244
VISIBLE_IF APPLE
245
245
VERIFY HAVE_AVFOUNDATION)
246
246
OCV_OPTION(WITH_AVIF "Enable AVIF support" OFF
@@ -249,15 +249,15 @@ OCV_OPTION(WITH_CAP_IOS "Enable iOS video capture" ON
249
249
VISIBLE_IF IOS
250
250
VERIFY HAVE_CAP_IOS)
251
251
OCV_OPTION(WITH_CAROTENE "Use NVidia carotene acceleration library for ARM platform" (NOT CV_DISABLE_OPTIMIZATION)
252
- VISIBLE_IF (ARM OR AARCH64) AND NOT IOS)
252
+ VISIBLE_IF (ARM OR AARCH64) AND NOT IOS AND NOT XROS )
253
253
OCV_OPTION(WITH_CPUFEATURES "Use cpufeatures Android library" ON
254
254
VISIBLE_IF ANDROID
255
255
VERIFY HAVE_CPUFEATURES)
256
256
OCV_OPTION(WITH_VTK "Include VTK library support (and build opencv_viz module eiher)" ON
257
- VISIBLE_IF NOT ANDROID AND NOT IOS AND NOT WINRT AND NOT CMAKE_CROSSCOMPILING
257
+ VISIBLE_IF NOT ANDROID AND NOT IOS AND NOT XROS AND NOT WINRT AND NOT CMAKE_CROSSCOMPILING
258
258
VERIFY HAVE_VTK)
259
259
OCV_OPTION(WITH_CUDA "Include NVidia Cuda Runtime support" OFF
260
- VISIBLE_IF NOT IOS AND NOT WINRT
260
+ VISIBLE_IF NOT IOS AND NOT XROS AND NOT WINRT
261
261
VERIFY HAVE_CUDA)
262
262
OCV_OPTION(WITH_CUFFT "Include NVidia Cuda Fast Fourier Transform (FFT) library support" WITH_CUDA
263
263
VISIBLE_IF WITH_CUDA
@@ -278,10 +278,10 @@ OCV_OPTION(WITH_EIGEN "Include Eigen2/Eigen3 support" (NOT CV_DISABLE_OPTIMIZATI
278
278
VISIBLE_IF NOT WINRT
279
279
VERIFY HAVE_EIGEN)
280
280
OCV_OPTION(WITH_FFMPEG "Include FFMPEG support" (NOT ANDROID)
281
- VISIBLE_IF NOT IOS AND NOT WINRT
281
+ VISIBLE_IF NOT IOS AND NOT XROS AND NOT WINRT
282
282
VERIFY HAVE_FFMPEG)
283
283
OCV_OPTION(WITH_GSTREAMER "Include Gstreamer support" ON
284
- VISIBLE_IF NOT ANDROID AND NOT IOS AND NOT WINRT
284
+ VISIBLE_IF NOT ANDROID AND NOT IOS AND NOT XROS AND NOT WINRT
285
285
VERIFY HAVE_GSTREAMER AND GSTREAMER_VERSION VERSION_GREATER "0.99" )
286
286
OCV_OPTION(WITH_GTK "Include GTK support" ON
287
287
VISIBLE_IF UNIX AND NOT APPLE AND NOT ANDROID
@@ -293,7 +293,7 @@ OCV_OPTION(WITH_WAYLAND "Include Wayland support" OFF
293
293
VISIBLE_IF UNIX AND NOT APPLE AND NOT ANDROID
294
294
VERIFY HAVE_WAYLAND)
295
295
OCV_OPTION(WITH_IPP "Include Intel IPP support" (NOT MINGW AND NOT CV_DISABLE_OPTIMIZATION)
296
- VISIBLE_IF (X86_64 OR X86) AND NOT WINRT AND NOT IOS
296
+ VISIBLE_IF (X86_64 OR X86) AND NOT WINRT AND NOT IOS AND NOT XROS
297
297
VERIFY HAVE_IPP)
298
298
OCV_OPTION(WITH_HALIDE "Include Halide support" OFF
299
299
VISIBLE_IF TRUE
@@ -309,10 +309,10 @@ OCV_OPTION(WITH_WEBNN "Include WebNN support" OFF
309
309
VISIBLE_IF TRUE
310
310
VERIFY HAVE_WEBNN)
311
311
OCV_OPTION(WITH_JASPER "Include JPEG2K support (Jasper)" ON
312
- VISIBLE_IF NOT IOS
312
+ VISIBLE_IF NOT IOS AND NOT XROS
313
313
VERIFY HAVE_JASPER)
314
314
OCV_OPTION(WITH_OPENJPEG "Include JPEG2K support (OpenJPEG)" ON
315
- VISIBLE_IF NOT IOS
315
+ VISIBLE_IF NOT IOS AND NOT XROS
316
316
VERIFY HAVE_OPENJPEG)
317
317
OCV_OPTION(WITH_JPEG "Include JPEG support" ON
318
318
VISIBLE_IF TRUE
@@ -330,10 +330,10 @@ OCV_OPTION(WITH_OPENVX "Include OpenVX support" OFF
330
330
VISIBLE_IF TRUE
331
331
VERIFY HAVE_OPENVX)
332
332
OCV_OPTION(WITH_OPENNI "Include OpenNI support" OFF
333
- VISIBLE_IF NOT ANDROID AND NOT IOS AND NOT WINRT
333
+ VISIBLE_IF NOT ANDROID AND NOT IOS AND NOT XROS AND NOT WINRT
334
334
VERIFY HAVE_OPENNI)
335
335
OCV_OPTION(WITH_OPENNI2 "Include OpenNI2 support" OFF
336
- VISIBLE_IF NOT ANDROID AND NOT IOS AND NOT WINRT
336
+ VISIBLE_IF NOT ANDROID AND NOT IOS AND NOT XROS AND NOT WINRT
337
337
VERIFY HAVE_OPENNI2)
338
338
OCV_OPTION(WITH_PNG "Include PNG support" ON
339
339
VISIBLE_IF TRUE
@@ -345,19 +345,19 @@ OCV_OPTION(WITH_GDCM "Include DICOM support" OFF
345
345
VISIBLE_IF TRUE
346
346
VERIFY HAVE_GDCM)
347
347
OCV_OPTION(WITH_PVAPI "Include Prosilica GigE support" OFF
348
- VISIBLE_IF NOT ANDROID AND NOT IOS AND NOT WINRT
348
+ VISIBLE_IF NOT ANDROID AND NOT IOS AND NOT XROS AND NOT WINRT
349
349
VERIFY HAVE_PVAPI)
350
350
OCV_OPTION(WITH_ARAVIS "Include Aravis GigE support" OFF
351
- VISIBLE_IF NOT ANDROID AND NOT IOS AND NOT WINRT AND NOT WIN32
351
+ VISIBLE_IF NOT ANDROID AND NOT IOS AND NOT XROS AND NOT WINRT AND NOT WIN32
352
352
VERIFY HAVE_ARAVIS_API)
353
353
OCV_OPTION(WITH_QT "Build with Qt Backend support" OFF
354
- VISIBLE_IF NOT ANDROID AND NOT IOS AND NOT WINRT
354
+ VISIBLE_IF NOT ANDROID AND NOT IOS AND NOT XROS AND NOT WINRT
355
355
VERIFY HAVE_QT)
356
356
OCV_OPTION(WITH_WIN32UI "Build with Win32 UI Backend support" ON
357
357
VISIBLE_IF WIN32 AND NOT WINRT
358
358
VERIFY HAVE_WIN32UI)
359
359
OCV_OPTION(WITH_TBB "Include Intel TBB support" OFF
360
- VISIBLE_IF NOT IOS AND NOT WINRT
360
+ VISIBLE_IF NOT IOS AND NOT XROS AND NOT WINRT
361
361
VERIFY HAVE_TBB)
362
362
OCV_OPTION(WITH_HPX "Include Ste||ar Group HPX support" OFF
363
363
VISIBLE_IF TRUE
@@ -369,7 +369,7 @@ OCV_OPTION(WITH_PTHREADS_PF "Use pthreads-based parallel_for" ON
369
369
VISIBLE_IF NOT WIN32 OR MINGW
370
370
VERIFY HAVE_PTHREADS_PF)
371
371
OCV_OPTION(WITH_TIFF "Include TIFF support" ON
372
- VISIBLE_IF NOT IOS
372
+ VISIBLE_IF NOT IOS AND NOT XROS
373
373
VERIFY HAVE_TIFF)
374
374
OCV_OPTION(WITH_V4L "Include Video 4 Linux support" ON
375
375
VISIBLE_IF UNIX AND NOT ANDROID AND NOT APPLE
@@ -396,16 +396,16 @@ OCV_OPTION(WITH_CLP "Include Clp support (EPL)" OFF
396
396
VISIBLE_IF TRUE
397
397
VERIFY HAVE_CLP)
398
398
OCV_OPTION(WITH_OPENCL "Include OpenCL Runtime support" (NOT ANDROID AND NOT CV_DISABLE_OPTIMIZATION)
399
- VISIBLE_IF NOT IOS AND NOT WINRT
399
+ VISIBLE_IF NOT IOS AND NOT XROS AND NOT WINRT
400
400
VERIFY HAVE_OPENCL)
401
401
OCV_OPTION(WITH_OPENCL_SVM "Include OpenCL Shared Virtual Memory support" OFF
402
402
VISIBLE_IF TRUE
403
403
VERIFY HAVE_OPENCL_SVM) # experimental
404
404
OCV_OPTION(WITH_OPENCLAMDFFT "Include AMD OpenCL FFT library support" ON
405
- VISIBLE_IF NOT ANDROID AND NOT IOS AND NOT WINRT
405
+ VISIBLE_IF NOT ANDROID AND NOT IOS AND NOT XROS AND NOT WINRT
406
406
VERIFY HAVE_CLAMDFFT)
407
407
OCV_OPTION(WITH_OPENCLAMDBLAS "Include AMD OpenCL BLAS library support" ON
408
- VISIBLE_IF NOT ANDROID AND NOT IOS AND NOT WINRT
408
+ VISIBLE_IF NOT ANDROID AND NOT IOS AND NOT XROS AND NOT WINRT
409
409
VERIFY HAVE_CLAMDBLAS)
410
410
OCV_OPTION(WITH_DIRECTX "Include DirectX support" ON
411
411
VISIBLE_IF WIN32 AND NOT WINRT
@@ -429,13 +429,13 @@ OCV_OPTION(WITH_MFX "Include Intel Media SDK support" OFF
429
429
VISIBLE_IF (UNIX AND NOT ANDROID) OR (WIN32 AND NOT WINRT AND NOT MINGW)
430
430
VERIFY HAVE_MFX)
431
431
OCV_OPTION(WITH_GDAL "Include GDAL Support" OFF
432
- VISIBLE_IF NOT ANDROID AND NOT IOS AND NOT WINRT
432
+ VISIBLE_IF NOT ANDROID AND NOT IOS AND NOT XROS AND NOT WINRT
433
433
VERIFY HAVE_GDAL)
434
434
OCV_OPTION(WITH_GPHOTO2 "Include gPhoto2 library support" OFF
435
- VISIBLE_IF UNIX AND NOT ANDROID AND NOT IOS
435
+ VISIBLE_IF UNIX AND NOT ANDROID AND NOT IOS AND NOT XROS
436
436
VERIFY HAVE_GPHOTO2)
437
437
OCV_OPTION(WITH_LAPACK "Include Lapack library support" (NOT CV_DISABLE_OPTIMIZATION)
438
- VISIBLE_IF NOT ANDROID AND NOT IOS
438
+ VISIBLE_IF NOT ANDROID AND NOT IOS AND NOT XROS
439
439
VERIFY HAVE_LAPACK)
440
440
OCV_OPTION(WITH_ITT "Include Intel ITT support" ON
441
441
VISIBLE_IF NOT APPLE_FRAMEWORK
@@ -516,7 +516,7 @@ OCV_OPTION(INSTALL_TESTS "Install accuracy and performance test binar
516
516
# OpenCV build options
517
517
# ===================================================
518
518
OCV_OPTION(ENABLE_CCACHE "Use ccache" (UNIX AND (CMAKE_GENERATOR MATCHES "Makefile" OR CMAKE_GENERATOR MATCHES "Ninja" OR CMAKE_GENERATOR MATCHES "Xcode" )) )
519
- OCV_OPTION(ENABLE_PRECOMPILED_HEADERS "Use precompiled headers" MSVC IF (MSVC OR (NOT IOS AND NOT CMAKE_CROSSCOMPILING ) ) )
519
+ OCV_OPTION(ENABLE_PRECOMPILED_HEADERS "Use precompiled headers" MSVC IF (MSVC OR (NOT IOS AND NOT XROS AND NOT CMAKE_CROSSCOMPILING ) ) )
520
520
OCV_OPTION(ENABLE_DELAYLOAD "Enable delayed loading of OpenCV DLLs" OFF VISIBLE_IF MSVC AND BUILD_SHARED_LIBS )
521
521
OCV_OPTION(ENABLE_SOLUTION_FOLDERS "Solution folder in Visual Studio or in other IDEs" (MSVC_IDE OR CMAKE_GENERATOR MATCHES Xcode) )
522
522
OCV_OPTION(ENABLE_PROFILING "Enable profiling in the GCC compiler (Add flags: -g -pg)" OFF IF CV_GCC )
@@ -526,8 +526,8 @@ OCV_OPTION(ENABLE_OMIT_FRAME_POINTER "Enable -fomit-frame-pointer for GCC"
526
526
OCV_OPTION(ENABLE_POWERPC "Enable PowerPC for GCC" ON IF (CV_GCC AND CMAKE_SYSTEM_PROCESSOR MATCHES powerpc.*) )
527
527
OCV_OPTION(ENABLE_FAST_MATH "Enable compiler options for fast math optimizations on FP computations (not recommended)" OFF )
528
528
if (NOT IOS AND (NOT ANDROID OR OPENCV_ANDROID_USE_LEGACY_FLAGS) AND CMAKE_CROSSCOMPILING ) # Use CPU_BASELINE instead
529
- OCV_OPTION(ENABLE_NEON "Enable NEON instructions" (NEON OR ANDROID_ARM_NEON OR AARCH64) IF (CV_GCC OR CV_CLANG) AND (ARM OR AARCH64 OR IOS) )
530
- OCV_OPTION(ENABLE_VFPV3 "Enable VFPv3-D32 instructions" OFF IF (CV_GCC OR CV_CLANG) AND (ARM OR AARCH64 OR IOS) )
529
+ OCV_OPTION(ENABLE_NEON "Enable NEON instructions" (NEON OR ANDROID_ARM_NEON OR AARCH64) IF (CV_GCC OR CV_CLANG) AND (ARM OR AARCH64 OR IOS OR XROS ) )
530
+ OCV_OPTION(ENABLE_VFPV3 "Enable VFPv3-D32 instructions" OFF IF (CV_GCC OR CV_CLANG) AND (ARM OR AARCH64 OR IOS OR XROS ) )
531
531
endif ()
532
532
OCV_OPTION(ENABLE_NOISY_WARNINGS "Show all warnings even if they are too noisy" OFF )
533
533
OCV_OPTION(OPENCV_WARNINGS_ARE_ERRORS "Treat warnings as errors" OFF )
@@ -649,7 +649,7 @@ endif()
649
649
ocv_cmake_hook(POST_CMAKE_BUILD_OPTIONS)
650
650
651
651
# --- Python Support ---
652
- if (NOT IOS)
652
+ if (NOT IOS AND NOT XROS )
653
653
include (cmake/OpenCVDetectPython.cmake)
654
654
endif ()
655
655
@@ -734,7 +734,7 @@ include(cmake/OpenCVModule.cmake)
734
734
# Detect endianness of build platform
735
735
# ----------------------------------------------------------------------------
736
736
737
- if (IOS)
737
+ if (IOS OR XROS )
738
738
# test_big_endian needs try_compile, which doesn't work for iOS
739
739
# http://public.kitware.com/Bug/view.php?id=12288
740
740
set (WORDS_BIGENDIAN 0)
@@ -1007,7 +1007,7 @@ include(cmake/OpenCVGenAndroidMK.cmake)
1007
1007
# Generate OpenCVConfig.cmake and OpenCVConfig-version.cmake for cmake projects
1008
1008
include (cmake/OpenCVGenConfig.cmake)
1009
1009
1010
- # Generate Info.plist for the IOS framework
1010
+ # Generate Info.plist for the iOS/visionOS framework
1011
1011
if (APPLE_FRAMEWORK)
1012
1012
include (cmake/OpenCVGenInfoPlist.cmake)
1013
1013
endif ()
0 commit comments