Skip to content

Commit

Permalink
xCFrameworks final path for lib [osx] now [macos]
Browse files Browse the repository at this point in the history
  • Loading branch information
danoli3 committed Aug 3, 2024
1 parent 79e2bf6 commit 95a3847
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 13 deletions.
10 changes: 9 additions & 1 deletion apothecary/apothecary
Original file line number Diff line number Diff line change
Expand Up @@ -1269,7 +1269,7 @@ function doCommand() {
# does this formula support the current build type?
local bFormulaType=0 # bool
isFormulaType $TYPE bFormulaType
if [ $bFormulaType == 0 ] ; then
if [ $bFormulaType == 0 ] && [ $TYPE != "macos" ] ; then
echoInfo " Skipping \"$currentLib\": $cmd not needed for type \"$TYPE\""
else
# do command
Expand Down Expand Up @@ -1547,6 +1547,10 @@ function frameworkFormula() {

if [ ! -e "$LIBS_DIR/$1" ] ; then
echoVerbose " Nothing to create framework from to merge in lib dest dir: \"$1\""
exit 0;
elif [ $1 == "pkg-config" ] ; then
echoVerbose " No need to create framework for: \"$1\""
exit 0;
else
rm -rf $LIBS_DIR_REAL/$1/lib/$TYPE/*.xcframework

Expand Down Expand Up @@ -1820,6 +1824,10 @@ function xframeworkFormula() {

if [ ! -e "$LIBS_DIR/$1" ] ; then
echoVerbose " Nothing to create framework from to merge in lib dest dir: \"$1\""
exit 0;
elif [ $1 == "pkg-config" ] ; then
echoVerbose " No need to create framework for: \"$1\""
exit 0;
else
# rm -rf $LIBS_DIR_REAL/$1/lib/$TYPE/*.xcframework

Expand Down
11 changes: 4 additions & 7 deletions scripts/osx/build_xcframework.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@ else
export BUNDLE=$BUNDLE_NO
fi

export TARGET=osx
export TARGET=macos
export ARCH=arm64
export NO_FORCE=ON
export XFRAMEWORKALL=TRUE

echo "Target: $TARGET"
echo "Architecture: $ARCH"
Expand All @@ -38,11 +39,7 @@ for formula in "${FORMULAS[@]}" ; do
#echo "./apothecary $ARGS framework $formula_name"
eval "cd $APOTHECARY_PATH";
echo "---------"
eval "./apothecary $ARGS framework $formula_name"

eval "./apothecary -x $ARGS framework $formula_name"
done
echo "Apothecary openFrameworks Build XCFramework for $TARGET complete."
echo "========================"



echo "========================"
8 changes: 3 additions & 5 deletions scripts/osx/xcframework_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ fi
OF_LIBS=${OF_ROOT}/libs
OF_ADDONS=${OF_ROOT}/addons

# control
if [ -z "${BUILD_LIBRARIES+x}" ]; then
BUILD_LIBRARIES=1
fi
Expand All @@ -25,7 +24,7 @@ if [ -z "${MOVE_LIBRARIES+x}" ]; then
fi

if [ -z "${PLATFORM+x}" ]; then
PLATFORM=osx
PLATFORM=macos
fi

# if [ -z "${ARCH+x}" ]; then
Expand Down Expand Up @@ -112,7 +111,7 @@ sort_libraries() {
rm -rf ${addon_path}
fi
mkdir -p $addon_path
if ! command -v rsync &> /dev/null; then
if ! command -v rsync &> /dev/null; then
cp -av ${OF_LIBS}/${addonslibs[i]}/* ${addon_path}
else
rsync -av ${OF_LIBS}/${addonslibs[i]}/ ${addon_path}/
Expand Down Expand Up @@ -144,5 +143,4 @@ if [ ${MOVE_LIBRARIES} == 1 ]; then
echo "========================"
fi

echo "Apothecary openFrameworks Build and installation complete."

echo "Apothecary openFrameworks Build and installation complete."

0 comments on commit 95a3847

Please sign in to comment.