Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Battle xCFramework complete #418

Merged
merged 1 commit into from
Aug 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading