diff --git a/Modules/@babylonjs/react-native/README.md b/Modules/@babylonjs/react-native/README.md index 2c4339348..95a36e612 100644 --- a/Modules/@babylonjs/react-native/README.md +++ b/Modules/@babylonjs/react-native/README.md @@ -34,6 +34,11 @@ To disable post install CMake generation, set this variable before running `npm export BABYLON_NO_CMAKE_POSTINSTALL=1 ``` +To use the system cmake (e.g. a Homebrew or system install) instead of the cmake bundled in the npm package, set this variable before running `npm install`: +``` +export BABYLON_USE_SYSTEM_CMAKE=1 +``` + ### Plugins selection Plugins can be disabled at build time. They are all enabled by default and disabling is done with environment variables: @@ -56,6 +61,7 @@ Babylon.js minimal version: |BabylonReactNative version | Babylon.js version | BabylonNative commit | | ----------- | ------------------------ | --- | +|2.0.2 | 9.0.0 | ce2edf0851e0c8483559832a4f8eb9d39c6b2f53 |2.0.0 | 8.3.0 | 6c25966e8f8c0f3a0c13fdf77064f1bde790391f diff --git a/Modules/@babylonjs/react-native/ios/CMakeLists.txt b/Modules/@babylonjs/react-native/ios/CMakeLists.txt index 9aaafc417..f23cc4068 100644 --- a/Modules/@babylonjs/react-native/ios/CMakeLists.txt +++ b/Modules/@babylonjs/react-native/ios/CMakeLists.txt @@ -19,6 +19,12 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall") set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -x objective-c++") +# wstring_convert and codecvt_utf8_utf16 are deprecated in C++17; prevent this from +# being treated as a hard error so the build succeeds on Xcode 26+ / Clang 20+. +if(CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") + add_compile_options(-Wno-deprecated-declarations) +endif() + set(BABYLON_NATIVE_PLUGIN_NATIVEXR 1) if(DEFINED ENV{BABYLON_NATIVE_PLUGIN_NATIVEXR}) set(BABYLON_NATIVE_PLUGIN_NATIVEXR $ENV{BABYLON_NATIVE_PLUGIN_NATIVEXR}) diff --git a/Modules/@babylonjs/react-native/postinstall.js b/Modules/@babylonjs/react-native/postinstall.js index 0e3cd7030..a7da65d08 100644 --- a/Modules/@babylonjs/react-native/postinstall.js +++ b/Modules/@babylonjs/react-native/postinstall.js @@ -2,6 +2,11 @@ const os = require("os"); const path = require("path"); function getCmakeExecutable() { + // When BABYLON_USE_SYSTEM_CMAKE=1, skip the npm cmake package and use whatever + // cmake is found on PATH (e.g. a Homebrew or system install). + if (process.env.BABYLON_USE_SYSTEM_CMAKE === '1') { + return 'cmake'; + } try { // cmake-runtime ships the cmake binary; resolve it directly to avoid // relying on npx or PATH. diff --git a/Package/gulpfile.js b/Package/gulpfile.js index 8283168e2..2d498c74e 100644 --- a/Package/gulpfile.js +++ b/Package/gulpfile.js @@ -230,7 +230,7 @@ const createPackage = async () => { exec('npm pack', 'Assembled'); }; -const COMMIT_ID = '887a0446c2ce5d379d931d802071cf6f9e008c6a'; +const COMMIT_ID = 'ce2edf0851e0c8483559832a4f8eb9d39c6b2f53'; const ZIP_URL = `https://github.com/BabylonJS/BabylonNative/archive/${COMMIT_ID}.zip`; const TARGET_DIR = path.resolve(__dirname, '../Modules/@babylonjs/react-native/shared/BabylonNative'); const ZIP_PATH = path.join(TARGET_DIR, `${COMMIT_ID}.zip`);