Skip to content

Commit

Permalink
Battle xCFramework complete (#418)
Browse files Browse the repository at this point in the history
  • Loading branch information
danoli3 committed Aug 4, 2024
1 parent e493e11 commit 8aac3a7
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions apothecary/apothecary
Original file line number Diff line number Diff line change
Expand Up @@ -1557,9 +1557,10 @@ function frameworkFormula() {
elif [ $1 == "pkg-config" ] || [ $1 == "kiss" ]; then
echoVerbose " No need to create framework for: \"$1\""
else
rm -rf $LIBS_DIR_REAL/$1/lib/$TYPE_OUT/*.xcframework
XDIR="${XLIBS_DIR_REAL}/"
rm -rf $XLIBS_DIR_REAL/$1/lib/$TYPE_OUT/*.xcframework

echoSuccess " Framework lib dest dir: \"$1\" \"$LIBS_DIR_REAL/$1/lib/$TYPE_OUT/\" "
echoSuccess " Framework lib dest dir: \"$1\" \"$XLIBS_DIR_REAL/$1/lib/$TYPE_OUT/\" "
xcframework_flags=""

XDIR="${XLIBS_DIR_REAL}/"
Expand All @@ -1572,9 +1573,9 @@ function frameworkFormula() {

if [[ $1 == "fmod" ]] || [[ $1 == "fmodex" ]] || [[ $1 == "glm" ]] || [[ $1 == "json" ]] || [[ $1 == "utf8" ]]; then
if ! command -v rsync &> /dev/null; then
if [[ -e "${LIBS_DIR_REAL}/${1}/lib/${TYPE_OUT}/" ]]; then
if [[ -e "${LIBS_DIR_REAL}/${1}/lib/${TYPE}/" ]]; then
mkdir -p "${X_LIBS}"
cp -av "${LIBS_DIR_REAL}/${1}/lib/${TYPE_OUT}/"* ${X_LIBS}
cp -av "${LIBS_DIR_REAL}/${1}/lib/${TYPE}/"* ${X_LIBS}
fi
if [[ -e "${LIBS_DIR_REAL}/${1}/include/" ]]; then
cp -av "${LIBS_DIR_REAL}/${1}/include/"* ${X_INCLUDE}
Expand All @@ -1583,9 +1584,9 @@ function frameworkFormula() {
cp -av "${LIBS_DIR_REAL}/${1}/license/"* ${X_LICENSE}
fi
else
if [[ -e "${LIBS_DIR_REAL}/${1}/lib/${TYPE_OUT}" ]]; then
if [[ -e "${LIBS_DIR_REAL}/${1}/lib/${TYPE}" ]]; then
mkdir -p "${X_LIBS}"
rsync -av --delete "${LIBS_DIR_REAL}/${1}/lib/${TYPE_OUT}/" ${X_LIBS}
rsync -av --delete "${LIBS_DIR_REAL}/${1}/lib/${TYPE}/" ${X_LIBS}
fi
if [[ -e "${LIBS_DIR_REAL}/${1}/include/" ]]; then
rsync -av --delete "${LIBS_DIR_REAL}/${1}/include/" ${X_INCLUDE}
Expand Down Expand Up @@ -1761,8 +1762,8 @@ function frameworkFormula() {



XCFRAMEWORK_PATH="${LIBS_DIR_REAL}/${1}/lib/${TYPE_OUT}/$1.xcframework"
cd "${LIBS_DIR_REAL}/${1}/lib/${TYPE_OUT}/"
XCFRAMEWORK_PATH="${XLIBS_DIR_REAL}/${1}/lib/${TYPE_OUT}/$1.xcframework"
cd "${XLIBS_DIR_REAL}/${1}/lib/${TYPE_OUT}/"
xcodebuild -create-xcframework $xcframework_flags -output $1.xcframework
echoSuccess " xcframework for $TYPE built successfully."
echo "========================"
Expand Down Expand Up @@ -1798,7 +1799,7 @@ function frameworkFormula() {
rm -rfv "${dir}"
done

rm -rfv "${XCFRAMEWORK_PATH}"
# rm -rfv "${XCFRAMEWORK_PATH}"


echoSuccess " xcframework for $TYPE built successfully."
Expand Down

0 comments on commit 8aac3a7

Please sign in to comment.