Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Modules/@babylonjs/react-native/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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


Expand Down
6 changes: 6 additions & 0 deletions Modules/@babylonjs/react-native/ios/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Comment thread
CedricGuillemet marked this conversation as resolved.

set(BABYLON_NATIVE_PLUGIN_NATIVEXR 1)
if(DEFINED ENV{BABYLON_NATIVE_PLUGIN_NATIVEXR})
set(BABYLON_NATIVE_PLUGIN_NATIVEXR $ENV{BABYLON_NATIVE_PLUGIN_NATIVEXR})
Expand Down
5 changes: 5 additions & 0 deletions Modules/@babylonjs/react-native/postinstall.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion Package/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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`);
Expand Down
Loading