Skip to content

Commit b513b3a

Browse files
committed
Intel MacOS Support
1 parent 840a991 commit b513b3a

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

CMakeLists.txt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
cmake_minimum_required(VERSION 3.21)
22
set(CMAKE_CXX_STANDARD 20)
33
set(CMAKE_CXX_STANDARD_REQUIRED ON)
4-
set(CMAKE_OSX_ARCHITECTURES "arm64")
4+
set(CMAKE_OSX_ARCHITECTURES "arm64;x86_64")
55
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
66

77
if (MSVC)
@@ -95,6 +95,13 @@ else ()
9595
${BZIP2_LIBRARY}
9696
"-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"
9797
) # macos
98+
99+
if(NOT CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64")
100+
set(STATIC_LIBS
101+
${STATIC_LIBS}
102+
${CMAKE_SOURCE_DIR}/lib/liblzma.a
103+
)
104+
endif()
98105
endif()
99106
target_link_libraries(${PROJECT_NAME} ${STATIC_LIBS})
100107

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ void audioRaw() {
5959
### Windows
6060
To get the needed libraries on Windows, you can use vcpkg:
6161
```sh
62-
vcpkg install ffmpeg[core,avcodec,avformat,avutil,swscale,swresample,amf,x264,x265,nvcodec,openh264,aom,vpx]:x64-windows-static --recurse
62+
vcpkg install ffmpeg[core,avcodec,avformat,swscale,swresample,amf,x264,x265,nvcodec,openh264,aom,vpx]:x64-windows-static --recurse
6363
```
6464
the other libraries are part of the Windows SDK
6565

@@ -86,12 +86,12 @@ brew install bzip2
8686

8787
git clone https://code.videolan.org/videolan/x264.git
8888
cd x264
89-
./configure --enable-static --disable-shared
89+
./configure --enable-static
9090
make
9191

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

0 commit comments

Comments
 (0)