Skip to content

Commit

Permalink
feat: bring back ios-simulator support
Browse files Browse the repository at this point in the history
This reverts commit 8cb7445.
  • Loading branch information
okwasniewski committed Apr 12, 2024
1 parent 8760336 commit dab5c06
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples/common/entry/entry_ios.mm
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#import <UIKit/UIKit.h>
#import <QuartzCore/CAEAGLLayer.h>

#if __IPHONE_8_0 && !TARGET_IPHONE_SIMULATOR // check if sdk/target supports metal
#if __IPHONE_13_0 // From iOS 13 Simulators support metal
# import <Metal/Metal.h>
# import <QuartzCore/CAMetalLayer.h>
# define HAS_METAL_SDK
Expand Down
2 changes: 1 addition & 1 deletion examples/runtime/ios-info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>com.company.$(PRODUCT_NAME:rfc1034identifier)</string>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
Expand Down
18 changes: 18 additions & 0 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ projgen: ## Generate project files for all configurations.
$(GENIE) --with-examples --gcc=wasm2js gmake
$(GENIE) --with-combined-examples --gcc=ios-arm gmake
$(GENIE) --with-combined-examples --gcc=ios-arm64 gmake
$(GENIE) --with-combined-examples --gcc=ios-simulator gmake
$(GENIE) --with-combined-examples --gcc=ios-simulator64 gmake
$(GENIE) --with-combined-examples --gcc=rpi gmake

idl: ## Generate code from IDL.
Expand Down Expand Up @@ -215,6 +217,22 @@ ios-arm64-release: .build/projects/gmake-ios-arm64 ## Build - iOS ARM64 Release
$(MAKE) -R -C .build/projects/gmake-ios-arm64 config=release
ios-arm64: ios-arm64-debug ios-arm64-release ## Build - iOS ARM64 Debug and Release

.build/projects/gmake-ios-simulator:
$(GENIE) --gcc=ios-simulator gmake
ios-simulator-debug: .build/projects/gmake-ios-simulator ## Build - iOS Simulator Debug
$(MAKE) -R -C .build/projects/gmake-ios-simulator config=debug
ios-simulator-release: .build/projects/gmake-ios-simulator ## Build - iOS Simulator Release
$(MAKE) -R -C .build/projects/gmake-ios-simulator config=release
ios-simulator: ios-simulator-debug ios-simulator-release ## Build - iOS Simulator Debug and Release

.build/projects/gmake-ios-simulator64:
$(GENIE) --gcc=ios-simulator64 gmake
ios-simulator64-debug: .build/projects/gmake-ios-simulator64 ## Build - iOS Simulator Debug
$(MAKE) -R -C .build/projects/gmake-ios-simulator64 config=debug
ios-simulator64-release: .build/projects/gmake-ios-simulator64 ## Build - iOS Simulator Release
$(MAKE) -R -C .build/projects/gmake-ios-simulator64 config=release
ios-simulator64: ios-simulator64-debug ios-simulator64-release ## Build - iOS Simulator Debug and Release

.build/projects/gmake-rpi:
$(GENIE) --gcc=rpi gmake
rpi-debug: .build/projects/gmake-rpi ## Build - RasberryPi Debug
Expand Down
5 changes: 5 additions & 0 deletions scripts/genie.lua
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,11 @@ function exampleProjectDefaults()
"-framework UIKit",
"-weak_framework Metal",
}
xcodecopyresources {
{ "shaders/metal", {
os.matchfiles(path.join(BGFX_DIR, "examples/runtime/shaders/metal/**.bin"))
}}
}

configuration { "xcode*", "ios" }
kind "WindowedApp"
Expand Down
2 changes: 1 addition & 1 deletion scripts/geometryv.lua
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ project ("geometryv")
"-framework UIKit",
}

configuration { "xcode4", "ios" }
configuration { "xcode*", "ios" }
kind "WindowedApp"

configuration { "qnx*" }
Expand Down

0 comments on commit dab5c06

Please sign in to comment.