Skip to content

Commit

Permalink
Merge branch 'gary/ios-simulator'
Browse files Browse the repository at this point in the history
  • Loading branch information
polycamnick committed Jan 3, 2024
2 parents f42c88a + cb37764 commit 63f19f8
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 0 deletions.
1 change: 1 addition & 0 deletions ports/ceres/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ vcpkg_cmake_configure(
-DPROVIDE_UNINSTALL_TARGET=OFF
-DMSVC_USE_STATIC_CRT=${MSVC_USE_STATIC_CRT_VALUE}
-DLIB_SUFFIX=${LIB_SUFFIX}
-DIOS_DEPLOYMENT_TARGET=15
)

vcpkg_cmake_install()
Expand Down
6 changes: 6 additions & 0 deletions ports/opencv4/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,12 @@ if("contrib" IN_LIST FEATURES)
endif()
endif()

if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "visionOS")
list(APPEND ADDITIONAL_BUILD_FLAGS "-DIOS=1")
list(APPEND ADDITIONAL_BUILD_FLAGS "-DWITH_AVFOUNDATION=OFF")
list(APPEND ADDITIONAL_BUILD_FLAGS "-DBUILD_opencv_videoio=OFF")
endif()

vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
Expand Down
2 changes: 2 additions & 0 deletions scripts/cmake/vcpkg_common_definitions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin")
set(VCPKG_TARGET_IS_OSX ON)
elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "iOS")
set(VCPKG_TARGET_IS_IOS ON)
elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "visionOS")
set(VCPKG_TARGET_IS_IOS ON)
elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux")
set(VCPKG_TARGET_IS_LINUX ON)
elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Android")
Expand Down
10 changes: 10 additions & 0 deletions triplets/community/arm64-ios-iphonesimulator.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
set(VCPKG_TARGET_ARCHITECTURE arm64)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE static)
set(VCPKG_CMAKE_SYSTEM_NAME iOS)
set(VCPKG_OSX_DEPLOYMENT_TARGET 15.0)
set(VCPKG_BUILD_TYPE release)
execute_process(COMMAND xcodebuild -version -sdk iphonesimulator Path
OUTPUT_VARIABLE VCPKG_OSX_SYSROOT
ERROR_QUIET
OUTPUT_STRIP_TRAILING_WHITESPACE)
11 changes: 11 additions & 0 deletions triplets/community/arm64-ios-xros.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
set(VCPKG_TARGET_ARCHITECTURE arm64)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE static)
set(VCPKG_CMAKE_SYSTEM_NAME visionOS)
set(VCPKG_OSX_DEPLOYMENT_TARGET 1.0)
set(VCPKG_BUILD_TYPE release)
execute_process(COMMAND xcodebuild -version -sdk xros Path
OUTPUT_VARIABLE VCPKG_OSX_SYSROOT
ERROR_QUIET
OUTPUT_STRIP_TRAILING_WHITESPACE)
set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE ${CMAKE_CURRENT_SOURCE_DIR}/scripts/toolchains/ios.cmake)
11 changes: 11 additions & 0 deletions triplets/community/arm64-ios-xrsimulator.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
set(VCPKG_TARGET_ARCHITECTURE arm64)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE static)
set(VCPKG_CMAKE_SYSTEM_NAME visionOS)
# set(VCPKG_OSX_DEPLOYMENT_TARGET 1.0) # Setting this breaks simulator builds due to a bug in CMake
set(VCPKG_BUILD_TYPE release)
execute_process(COMMAND xcodebuild -version -sdk xrsimulator Path
OUTPUT_VARIABLE VCPKG_OSX_SYSROOT
ERROR_QUIET
OUTPUT_STRIP_TRAILING_WHITESPACE)
set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE ${CMAKE_CURRENT_SOURCE_DIR}/scripts/toolchains/ios.cmake)

0 comments on commit 63f19f8

Please sign in to comment.