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.
23 lines
741 B
Bash
Executable File
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"
|
|
|