add tvOS boilerplate

This commit is contained in:
Aman Gupta 2020-06-09 14:30:46 -07:00
parent e9fc62b27d
commit 44a2ec5836
8 changed files with 36 additions and 1 deletions

View File

@ -13,6 +13,10 @@ macos:
ios:
xcodebuild -quiet -project "$(XCODE_PROJ)" -scheme "$(XCODE_SCHEME_BASE) (iOS only)" build
.PHONY: tvos
tvos:
xcodebuild -quiet -project "$(XCODE_PROJ)" -scheme "$(XCODE_SCHEME_BASE) (tvOS only)" build
.PHONY: clean
clean:
xcodebuild -quiet -project "$(XCODE_PROJ)" -scheme "$(XCODE_SCHEME_BASE)" clean

1
MoltenVK/tvOS Symbolic link
View File

@ -0,0 +1 @@
../Package/Latest/MoltenVK/tvOS

View File

@ -35,7 +35,7 @@ ${MVK_SAN} \
${MVK_LINK_WARN} \
-isysroot ${SDK_DIR} \
-iframework ${MVK_SYS_FWK_DIR} \
-framework Metal ${MVK_IOSURFACE_FWK} -framework ${MVK_UX_FWK} -framework QuartzCore -framework CoreGraphics -framework IOKit -framework Foundation \
-framework Metal ${MVK_IOSURFACE_FWK} -framework ${MVK_UX_FWK} -framework QuartzCore -framework CoreGraphics ${MVK_IOKIT_FWK} -framework Foundation \
--library-directory ${MVK_USR_LIB_DIR} \
-o "${BUILT_PRODUCTS_DIR}/dynamic/${MVK_DYLIB_NAME}" \
-force_load "${BUILT_PRODUCTS_DIR}/lib${PRODUCT_NAME}.a"

View File

@ -6,6 +6,7 @@ export MVK_OS="ios"
export MVK_UX_FWK="UIKit"
export MVK_MIN_OS_VERSION=${IPHONEOS_DEPLOYMENT_TARGET}
export MVK_IOSURFACE_FWK="-framework IOSurface"
export MVK_IOKIT_FWK="-framework IOKit"
# Do not link to IOSurface if deploying to iOS versions below 11.0, doing so will
# link IOSurface as a private framework, which will trigger App Store rejection.

View File

@ -6,5 +6,6 @@ export MVK_OS="macosx"
export MVK_UX_FWK="AppKit"
export MVK_MIN_OS_VERSION=${MACOSX_DEPLOYMENT_TARGET}
export MVK_IOSURFACE_FWK="-framework IOSurface"
export MVK_IOKIT_FWK="-framework IOKit"
. "${SRCROOT}/../Scripts/create_dylib.sh"

11
Scripts/create_dylib_tvos.sh Executable file
View File

@ -0,0 +1,11 @@
#!/bin/bash
set -e
export MVK_OS="tvos"
export MVK_UX_FWK="UIKit"
export MVK_MIN_OS_VERSION=${TVOS_DEPLOYMENT_TARGET}
export MVK_IOSURFACE_FWK="-framework IOSurface"
export MVK_IOKIT_FWK=""
. "${SRCROOT}/../Scripts/create_dylib.sh"

View File

@ -0,0 +1,7 @@
#!/bin/bash
export MVK_OS="tvOS"
export MVK_BUILT_PROD_PATH="${BUILT_PRODUCTS_DIR}-appletvos"
"${SRCROOT}/Scripts/package_ext_libs.sh"

10
Scripts/package_tvos.sh Executable file
View File

@ -0,0 +1,10 @@
#!/bin/bash
export MVK_OS="tvOS"
export MVK_BUILT_PROD_PATH="${BUILT_PRODUCTS_DIR}-appletvos"
. "${SRCROOT}/Scripts/package_moltenvk.sh"
. "${SRCROOT}/Scripts/package_shader_converter.sh"
. "${SRCROOT}/Scripts/package_docs.sh"
. "${SRCROOT}/Scripts/package_update_latest.sh"