Skip to content

Conversation

@CedricGuillemet
Copy link
Contributor

@CedricGuillemet CedricGuillemet commented Jun 10, 2025

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a new CMake build flag BABYLON_NATIVE_BUILD_SOURCETREE to conditionally bypass the Android-only build restriction in the AndroidExtensions project. This is part of ongoing work related to BabylonReactNative PR #665.

Changes:

  • Modified the Android platform check to allow builds for non-Android platforms when BABYLON_NATIVE_BUILD_SOURCETREE flag is set

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

FetchContent_MakeAvailable(CMakeExtensions)

project(AndroidExtensions)

Copy link

Copilot AI Jan 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The flag BABYLON_NATIVE_BUILD_SOURCETREE is not documented anywhere in the codebase. Consider adding documentation or comments explaining what this flag is for, when it should be used, and what platforms are supported when it's enabled. This will help other developers understand the purpose and proper usage of this build configuration.

Suggested change
# BABYLON_NATIVE_BUILD_SOURCETREE is an internal flag used when this project is
# built as part of the Babylon Native source tree (for example, via the parent
# Babylon Native CMake build). In that scenario, the outer build system controls
# the target platforms and toolchains, so we allow configuration even when the
# CMake ANDROID variable is not set.
#
# When building AndroidExtensions standalone (i.e., not from within the Babylon
# Native source tree), this flag should normally remain unset, and the project is
# intended to build only for Android. In that case, we enforce the Android-only
# restriction with the check below.

Copilot uses AI. Check for mistakes.
@CedricGuillemet CedricGuillemet merged commit 2d5af72 into main Jan 12, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants