Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow building and packaging MoltenVK for of only iOS or only macOS. Move packaging scripts out of Xcode projects and into script files.
- Loading branch information
1 parent
4fcd64c
commit e721dd6
Showing
15 changed files
with
719 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
export MVK_PROD_NAME="MoltenVK" | ||
export MVK_DYLIB_NAME="lib${MVK_PROD_NAME}.dylib" | ||
export MVK_BUILT_PROD_PATH="${BUILT_PRODUCTS_DIR}" | ||
export MVK_SYS_FWK_DIR="${SDK_DIR}/System/Library/Frameworks" | ||
export MVK_USR_LIB_DIR="${SDK_DIR}/usr/lib" | ||
|
||
# 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. | ||
if [ $(echo "${IPHONEOS_DEPLOYMENT_TARGET} >= 11.0" | bc) -eq 1 ] | ||
then | ||
export MVK_IOSURFACE_FWK="-framework IOSurface" | ||
else | ||
export MVK_IOSURFACE_FWK="" | ||
fi | ||
|
||
clang \ | ||
-dynamiclib \ | ||
-arch arm64 \ | ||
-mios-version-min=${IPHONEOS_DEPLOYMENT_TARGET} \ | ||
-compatibility_version 1.0.0 -current_version 1.0.0 \ | ||
-install_name "@rpath/${MVK_DYLIB_NAME}" \ | ||
-Wno-incompatible-sysroot \ | ||
-isysroot ${SDK_DIR} \ | ||
-iframework ${MVK_SYS_FWK_DIR} \ | ||
-framework Metal ${MVK_IOSURFACE_FWK} -framework UIKit -framework QuartzCore -framework Foundation \ | ||
--library-directory ${MVK_USR_LIB_DIR} \ | ||
-lSystem -lc++ \ | ||
-o "${MVK_BUILT_PROD_PATH}/${MVK_DYLIB_NAME}" \ | ||
-force_load "${MVK_BUILT_PROD_PATH}/${MVK_PROD_NAME}.framework/${MVK_PROD_NAME}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
export MVK_PROD_NAME="MoltenVK" | ||
export MVK_DYLIB_NAME="lib${MVK_PROD_NAME}.dylib" | ||
export MVK_BUILT_PROD_PATH="${BUILT_PRODUCTS_DIR}" | ||
export MVK_SYS_FWK_DIR="${SDK_DIR}/System/Library/Frameworks" | ||
export MVK_USR_LIB_DIR="${SDK_DIR}/usr/lib" | ||
|
||
clang \ | ||
-dynamiclib \ | ||
-arch x86_64 \ | ||
-mmacosx-version-min=${MACOSX_DEPLOYMENT_TARGET} \ | ||
-compatibility_version 1.0.0 -current_version 1.0.0 \ | ||
-install_name "@rpath/${MVK_DYLIB_NAME}" \ | ||
-Wno-incompatible-sysroot \ | ||
-isysroot ${SDK_DIR} \ | ||
-iframework ${MVK_SYS_FWK_DIR} \ | ||
-framework Metal -framework IOSurface -framework IOKit -framework QuartzCore -framework Foundation \ | ||
--library-directory ${MVK_USR_LIB_DIR} \ | ||
-lSystem -lc++ \ | ||
-o "${MVK_BUILT_PROD_PATH}/${MVK_DYLIB_NAME}" \ | ||
-force_load "${MVK_BUILT_PROD_PATH}/${MVK_PROD_NAME}.framework/${MVK_PROD_NAME}" |
Oops, something went wrong.