forked from pion/mediadevices
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add opus and openh264 for arm64 Co-authored-by: Atsushi Watanabe <[email protected]> Co-authored-by: Earther <[email protected]>
- Loading branch information
Showing
6 changed files
with
58 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
FROM dockercore/golang-cross as m1cross | ||
|
||
ARG DEBIAN_FRONTEND=noninteractive | ||
RUN apt-get update -qq && apt-get install -y -q --no-install-recommends \ | ||
cmake \ | ||
git \ | ||
libssl-dev \ | ||
libxml2-dev \ | ||
libz-dev \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
ENV SDK_VERSION=11.3 \ | ||
TARGET_DIR=/osxcross/target \ | ||
UNATTENDED=1 | ||
|
||
WORKDIR /work | ||
RUN git clone --depth=1 https://github.com/tpoechtrager/osxcross.git /work \ | ||
&& cd /work/tarballs \ | ||
&& wget -q https://github.com/phracker/MacOSX-SDKs/releases/download/${SDK_VERSION}/MacOSX${SDK_VERSION}.sdk.tar.xz | ||
|
||
# Build cross compile toolchain for Apple silicon | ||
RUN ./build.sh | ||
|
||
|
||
FROM dockcross/base | ||
|
||
ENV OSX_CROSS_PATH=/osxcross | ||
|
||
COPY --from=m1cross "${OSX_CROSS_PATH}/." "${OSX_CROSS_PATH}/" | ||
ENV PATH=${OSX_CROSS_PATH}/target/bin:$PATH | ||
|
||
COPY init.sh /tmp/init.sh | ||
RUN bash /tmp/init.sh | ||
|
||
ENV CC=arm64-apple-darwin20.4-clang \ | ||
CXX=arm64-apple-darwin20.4-clang++ \ | ||
CPP=arm64-apple-darwin20.4-clang++ \ | ||
AR=arm64-apple-darwin20.4-ar \ | ||
AS=arm64-apple-darwin20.4-as \ | ||
LD=arm64-apple-darwin20.4-ld | ||
|
||
COPY darwin-arm64.cmake ${OSX_CROSS_PATH}/ | ||
ENV CMAKE_TOOLCHAIN_FILE ${OSX_CROSS_PATH}/darwin-arm64.cmake | ||
|
||
ARG IMAGE=lherman/cross-darwin-arm64 | ||
ARG VERSION=latest | ||
ENV DEFAULT_DOCKCROSS_IMAGE ${IMAGE}:${VERSION} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
set(CMAKE_SYSTEM_NAME Darwin) | ||
set(CMAKE_SYSTEM_VERSION 1) | ||
set(CMAKE_SYSTEM_PROCESSOR arm64) | ||
|
||
set(CMAKE_C_COMPILER $ENV{CC}) | ||
set(CMAKE_CXX_COMPILER $ENV{CXX}) | ||
set(CMAKE_AR $ENV{AR}) | ||
set(CMAKE_ASM_COMPILER ${CMAKE_C_COMPILER}) |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters