moltenvk/Scripts/create_fat_libs.sh
Bill Hollings 9fea13773d Support iOS simulator and fat library builds of MoltenVK libraries.
Create fat builds of static, dynamic & framework libraries if both iOS
and simulator versions have been created from separate manual Xcode builds.

Refactor scripts for creating fat libraries to reuse across projects.
Add MVK_BUILT_PROD_DIR to replace use of BUILT_PRODUCTS_DIR in most scripts
to allow flexibility across per-platform compilation.
2020-06-19 09:53:43 -04:00

23 lines
741 B
Bash
Executable File

#!/bin/bash
# Load functions
. "${SRCROOT}/../Scripts/create_fat_lib_func.sh"
set -e
#Static library
export MVK_BUILT_OS_PROD_DIR="${BUILT_PRODUCTS_DIR}/../${CONFIGURATION}-${MVK_OS_PROD_EXTN}"
export MVK_BUILT_SIM_PROD_DIR="${BUILT_PRODUCTS_DIR}/../${CONFIGURATION}-${MVK_SIM_PROD_EXTN}"
export MVK_BUILT_FAT_PROD_DIR="${BUILT_PRODUCTS_DIR}/../${CONFIGURATION}-${MVK_OS}"
create_fat_lib "lib${PRODUCT_NAME}.a"
# Dynamic library and associated dSYM
export MVK_BUILT_OS_PROD_DIR="${MVK_BUILT_OS_PROD_DIR}/dynamic"
export MVK_BUILT_SIM_PROD_DIR="${MVK_BUILT_SIM_PROD_DIR}/dynamic"
export MVK_BUILT_FAT_PROD_DIR="${MVK_BUILT_FAT_PROD_DIR}/dynamic"
create_fat_lib "lib${PRODUCT_NAME}.dylib"
create_fat_lib "lib${PRODUCT_NAME}.dylib.dSYM"