Skip to content

Commit

Permalink
Intel MacOS Support
Browse files Browse the repository at this point in the history
  • Loading branch information
ninXout committed Oct 16, 2024
1 parent 840a991 commit b513b3a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
9 changes: 8 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.21)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_OSX_ARCHITECTURES "arm64")
set(CMAKE_OSX_ARCHITECTURES "arm64;x86_64")
set(CMAKE_CXX_VISIBILITY_PRESET hidden)

if (MSVC)
Expand Down Expand Up @@ -95,6 +95,13 @@ else ()
${BZIP2_LIBRARY}
"-lm -lbz2 -lz -liconv -pthread -framework Security -framework VideoToolbox -framework CoreFoundation -framework CoreMedia -framework CoreVideo -framework CoreServices -framework CoreAudio -framework AVFoundation -framework CoreGraphics -framework AudioToolbox -framework Metal -framework CoreImage -framework AppKit"
) # macos

if(NOT CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64")
set(STATIC_LIBS
${STATIC_LIBS}
${CMAKE_SOURCE_DIR}/lib/liblzma.a
)
endif()
endif()
target_link_libraries(${PROJECT_NAME} ${STATIC_LIBS})

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ void audioRaw() {
### Windows
To get the needed libraries on Windows, you can use vcpkg:
```sh
vcpkg install ffmpeg[core,avcodec,avformat,avutil,swscale,swresample,amf,x264,x265,nvcodec,openh264,aom,vpx]:x64-windows-static --recurse
vcpkg install ffmpeg[core,avcodec,avformat,swscale,swresample,amf,x264,x265,nvcodec,openh264,aom,vpx]:x64-windows-static --recurse
```
the other libraries are part of the Windows SDK

Expand All @@ -86,12 +86,12 @@ brew install bzip2

git clone https://code.videolan.org/videolan/x264.git
cd x264
./configure --enable-static --disable-shared
./configure --enable-static
make

git clone https://git.ffmpeg.org/ffmpeg.git ffmpeg
brew install automake fdk-aac git lame libass libtool libvorbis libvpx opus sdl shtool texi2html theora wget x264 x265 xvid nasm
mkdir output
./configure --prefix=$PWD/output --enable-static --disable-shared --enable-libx264 --enable-gpl
./configure --prefix=$PWD/output --enable-static --enable-libx264 --enable-gpl
make
```

0 comments on commit b513b3a

Please sign in to comment.