Skip to content

Commit

Permalink
Fix build script
Browse files Browse the repository at this point in the history
  • Loading branch information
mihai8804858 committed Jul 8, 2024
1 parent 3e54fd2 commit e7490e1
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions build-libraries.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ checkout() {
cd $SOURCE_DIR
# Change this when visionOS support is added
git clone [email protected]:mihai8804858/ffmpeg-kit.git
cd ffmpeg-kit
cd ..
}

build_ios() {
Expand Down Expand Up @@ -62,10 +62,12 @@ build_macos() {
}

build() {
cd $SOURCE_DIR/ffmpeg-kit
build_ios
build_tvos
build_xros
build_macos
cd ../..
}

create_fat_library() {
Expand Down Expand Up @@ -139,6 +141,7 @@ create_xcframework() {
}

create_xcframeworks() {
cd $SOURCE_DIR/ffmpeg-kit
recreate_dir "./$XCF_DIR"

create_xcframework "fontconfig" "lib/libfontconfig.a" "include"
Expand All @@ -147,15 +150,17 @@ create_xcframeworks() {
create_xcframework "fribidi" "lib/libfribidi.a" "include"
create_xcframework "libpng" "lib/libpng16.a" "include"
create_xcframework "libass" "lib/libass.a" "include"

cd ../..
}

move_xcframework() {
rm -rf "../../$LIB_DIR/$1.xcframework"
cp -r "./$XCF_DIR/$1.xcframework" "../../$LIB_DIR/$1.xcframework"
rm -rf "$LIB_DIR/$1.xcframework"
cp -r "$SOURCE_DIR/ffmpeg-kit/$XCF_DIR/$1.xcframework" "$LIB_DIR/$1.xcframework"
}

move_xcframeworks() {
recreate_dir "../../$LIB_DIR"
recreate_dir $LIB_DIR

move_xcframework "fontconfig"
move_xcframework "freetype"
Expand Down

0 comments on commit e7490e1

Please sign in to comment.