Skip to content

Commit dd36ef6

Browse files
builds and links on iOS
1 parent 232604f commit dd36ef6

File tree

3 files changed

+17
-9
lines changed

3 files changed

+17
-9
lines changed

Apps/Playground/ios/Podfile.lock

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -856,7 +856,6 @@ PODS:
856856
- glog
857857
- RCT-Folly (= 2022.05.16.00)
858858
- React-Core
859-
- React-RCTFabric
860859
- react-native-slider (4.5.2):
861860
- glog
862861
- RCT-Folly (= 2022.05.16.00)
@@ -1237,7 +1236,7 @@ SPEC CHECKSUMS:
12371236
React-jsinspector: 32db5e364bcae8fca8cdf8891830636275add0c5
12381237
React-logger: 4136cd22748f4275b04bf82f7b6853ba93b5e0e3
12391238
React-Mapbuffer: ee9b45b26e759a099a3e024df50b25af390ee998
1240-
react-native-babylon: 34d3dc4084b73dd55fe46d8dbe1b2e4ced748e36
1239+
react-native-babylon: bc6e3fa3e8685e8ebc2c012c77d4cabeedf3fc3e
12411240
react-native-slider: adf61cd3d94d719844da9e73c97d1dee9639f658
12421241
React-nativeconfig: 1166714a4f7ea57a0df5c2cb44fbc70f98d580f9
12431242
React-NativeModulesApple: 5113fb30a94471378d4b0d44e86b71c1e3ca29c8

Modules/@babylonjs/react-native/react-native-babylon.podspec

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ package = JSON.parse(File.read(File.join(__dir__, "package.json")))
44

55
# This Podspec is used for local development
66

7+
base_base_path = '$(PODS_ROOT)/../../../../Modules/@babylonjs/Build/iOS'
8+
babylon_base_path = "#{base_base_path}/shared/BabylonNative/BabylonNative-21911774d516e677e99baecbee6054de9429f4b6"
9+
710
Pod::Spec.new do |s|
811
s.name = "react-native-babylon"
912
s.version = package["version"]
@@ -17,16 +20,20 @@ Pod::Spec.new do |s|
1720

1821
s.source_files = "ios/*.{h,m,mm}"
1922
s.requires_arc = true
20-
s.xcconfig = { 'USER_HEADER_SEARCH_PATHS' => '$(inherited) ${PODS_TARGET_SRCROOT}/shared ${PODS_TARGET_SRCROOT}/../react-native/shared' }
23+
s.xcconfig = { 'USER_HEADER_SEARCH_PATHS' => '$(inherited) ${PODS_TARGET_SRCROOT}/shared ${PODS_TARGET_SRCROOT}/../react-native/shared',
24+
'LIBRARY_SEARCH_PATHS'=> "$(inherited) #{babylon_base_path}/** #{base_base_path}/**" }
25+
2126

2227
s.vendored_frameworks = "ios/libs/*.xcframework"
2328

2429
s.frameworks = "MetalKit", "ARKit"
2530

26-
s.libraries = 'astc-encoder',
27-
'BabylonNative',
31+
s.libraries = 'BabylonNative',
2832
'bgfx',
2933
'bimg',
34+
'bimg_encode',
35+
'bimg_decode',
36+
'Scheduling',
3037
'bx',
3138
'Canvas',
3239
'GenericCodeGen',
@@ -48,7 +55,6 @@ Pod::Spec.new do |s|
4855
'SPIRV',
4956
'spirv-cross-core',
5057
'spirv-cross-msl',
51-
'tinyexr',
5258
'UrlLib',
5359
'Window',
5460
'XMLHttpRequest',

Package/gulpfile.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,12 @@ const buildTypeScript = async () => {
7878
};
7979

8080
const makeXCodeProj = async () => {
81-
shelljs.mkdir('-p', 'iOS/Build');
82-
exec(`cmake -B Build -G Xcode ${cmakeBasekitBuildDefinition} -DBUILD_RNAPP_DIR=Playground`, 'iOS');
81+
exec(`cmake react-native/ios -G Xcode -DBUILD_RNAPP_DIR=Playground -B Build/iOS -DFETCHCONTENT_FULLY_DISCONNECTED=ON -DBABYLON_NATIVE_BUILD_APPS=OFF -DBABYLON_NATIVE_INSTALL=OFF -DFETCHCONTENT_SOURCE_DIR_BGFX.CMAKE=../shared/BabylonNative/deps/bgfx.cmake-src -DFETCHCONTENT_SOURCE_DIR_ARCANA.CPP=../shared/BabylonNative/deps/arcana.cpp-src -DFETCHCONTENT_SOURCE_DIR_CMAKEEXTENSIONS=../shared/BabylonNative/deps/cmakeextensions-src -DFETCHCONTENT_SOURCE_DIR_JSRUNTIMEHOST=../shared/BabylonNative/deps/jsruntimehost-src -DFETCHCONTENT_SOURCE_DIR_URLLIB=../shared/BabylonNative/deps/urllib-src -DFETCHCONTENT_SOURCE_DIR_SPIRV-CROSS=../shared/BabylonNative/deps/spirv-cross-src -DFETCHCONTENT_SOURCE_DIR_LIBWEBP=../shared/BabylonNative/deps/libwebp-src -DFETCHCONTENT_SOURCE_DIR_GLSLANG=../shared/BabylonNative/deps/glslang-src -DFETCHCONTENT_SOURCE_DIR_BASE-N=../shared/BabylonNative/deps/base-n-src -DFETCHCONTENT_SOURCE_DIR_IOS-CMAKE=../shared/BabylonNative/deps/ios-cmake-src `,
82+
'../Modules/@babylonjs');
8383
};
84+
/*
85+
cmake -G Xcode . -B BabylonNative -DFETCHCONTENT_FULLY_DISCONNECTED=ON -DBABYLON_NATIVE_BUILD_APPS=OFF -DBABYLON_NATIVE_INSTALL=OFF -DFETCHCONTENT_SOURCE_DIR_BGFX.CMAKE=../shared/BabylonNative/deps/bgfx.cmake-src -DFETCHCONTENT_SOURCE_DIR_ARCANA.CPP=../shared/BabylonNative/deps/arcana.cpp-src -DFETCHCONTENT_SOURCE_DIR_CMAKEEXTENSIONS=../shared/BabylonNative/deps/cmakeextensions-src -DFETCHCONTENT_SOURCE_DIR_JSRUNTIMEHOST=../shared/BabylonNative/deps/jsruntimehost-src -DFETCHCONTENT_SOURCE_DIR_URLLIB=../shared/BabylonNative/deps/urllib-src -DFETCHCONTENT_SOURCE_DIR_SPIRV-CROSS=../shared/BabylonNative/deps/spirv-cross-src -DFETCHCONTENT_SOURCE_DIR_LIBWEBP=../shared/BabylonNative/deps/libwebp-src -DFETCHCONTENT_SOURCE_DIR_GLSLANG=../shared/BabylonNative/deps/glslang-src -DFETCHCONTENT_SOURCE_DIR_BASE-N=../shared/BabylonNative/deps/base-n-src -DFETCHCONTENT_SOURCE_DIR_IOS-CMAKE=../shared/BabylonNative/deps/ios-cmake-src
86+
*/
8487

8588
const buildIphoneOS = async () => {
8689
exec('xcodebuild -sdk iphoneos -configuration Release -project ReactNativeBabylon.xcodeproj -scheme BabylonNative build CODE_SIGNING_ALLOWED=NO', 'iOS/Build');
@@ -822,7 +825,7 @@ const buildBabylonNativeSourceTree = async () => {
822825
const copyFiles = gulp.parallel(copyIOSAndroidCommonFiles, copyIOSFiles, copyAndroidFiles);
823826

824827
//const buildIOS = gulp.series(makeXCodeProj, buildIphoneOS, buildIphoneSimulator);
825-
const buildIOS = gulp.series(makeXCodeProj, createXCFrameworks);
828+
const buildIOS = gulp.series(makeXCodeProj);//, createXCFrameworks);
826829
const buildTS = gulp.series(patchPackageVersion, copyCommonFiles, copySharedFiles, buildTypeScript, validateAssembled);
827830
const buildIOSAndroid = gulp.series(patchPackageVersion, buildIOS, buildAndroid, createIOSUniversalLibs, copyFiles, validateAssemblediOSAndroid);
828831
const build = gulp.series(buildIOSAndroid, switchToBaseKit, buildIOSAndroid);

0 commit comments

Comments
 (0)