@@ -11,7 +11,7 @@ include(FetchContent)
11
11
# --------------------------------------------------
12
12
FetchContent_Declare (AndroidExtensions
13
13
GIT_REPOSITORY https://github.com/BabylonJS/AndroidExtensions.git
14
- GIT_TAG 7d88a601fda9892791e7b4e994e375e049615688 )
14
+ GIT_TAG 66520bff9b57030b67894a4934d18ad7e161ba6f )
15
15
FetchContent_Declare (arcana.cpp
16
16
GIT_REPOSITORY https://github.com/microsoft/arcana.cpp.git
17
17
GIT_TAG 1a8a5d6e95413ed14b38a6ac9419048f9a9c8009 )
@@ -48,18 +48,27 @@ FetchContent_Declare(libwebp
48
48
49
49
FetchContent_MakeAvailable (CMakeExtensions )
50
50
51
- if (VISIONOS )
51
+ # BABYLON_NATIVE_BUILD_SOURCETREE flag is used by BabylonReactNative NPM build process.
52
+ # CMake script is run twice. At package creation, BABYLON_NATIVE_BUILD_SOURCETREE is ON
53
+ # which makes all dependencies to be fetched and packaged.
54
+ # At build time, cmake is run again on BabylonNative root but FETCHCONTENT_FULLY_DISCONNECTED is ON
55
+ # and FetchContent_MakeAvailable_With_Message will use provided local folder provided to cmake command line
56
+ # like '-DFETCHCONTENT_SOURCE_DIR_BGFX.CMAKE=../shared/Babylon/....'
57
+
58
+ if (VISIONOS OR IOS OR BABYLON_NATIVE_BUILD_SOURCETREE )
52
59
FetchContent_MakeAvailable_With_Message (ios-cmake )
53
- set (CMAKE_TOOLCHAIN_FILE "${ios-cmake_SOURCE_DIR}/ios.toolchain.cmake" CACHE PATH "" )
60
+ if (NOT BABYLON_NATIVE_BUILD_SOURCETREE )
61
+ set (CMAKE_TOOLCHAIN_FILE "${ios-cmake_SOURCE_DIR}/ios.toolchain.cmake" CACHE PATH "" )
62
+ endif ()
63
+ set (ENABLE_ARC OFF CACHE STRING "Enables or disables ARC support." )
64
+ endif ()
65
+
66
+ if (VISIONOS )
54
67
set (PLATFORM "VISIONOSCOMBINED" CACHE STRING "" )
55
68
set (DEPLOYMENT_TARGET "1.0" CACHE STRING "" )
56
- set (ENABLE_ARC OFF CACHE STRING "Enables or disables ARC support." )
57
69
elseif (IOS )
58
- FetchContent_MakeAvailable_With_Message (ios-cmake )
59
- set (CMAKE_TOOLCHAIN_FILE "${ios-cmake_SOURCE_DIR}/ios.toolchain.cmake" CACHE PATH "" )
60
70
set (PLATFORM "OS64COMBINED" CACHE STRING "" )
61
71
set (DEPLOYMENT_TARGET "13" CACHE STRING "" )
62
- set (ENABLE_ARC OFF CACHE STRING "Enables or disables ARC support." )
63
72
endif ()
64
73
65
74
project (BabylonNative )
0 commit comments