Created
June 10, 2023 15:55
-
-
Save markkimsal/c9bf2caa7cf86c3f8c22e267faec0510 to your computer and use it in GitHub Desktop.
cross compile libSDL2 for macos darwin
This file contains hidden or 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
install zig | |
install libobjc | |
get macosX SDK from hexops. | |
get SDL2 | |
mkdir build; cd build; | |
``` | |
CC="zig cc -target x86_64-macos -F /SDKs/sdk-macos-13.3/root/System/Library/Frameworks -iframework /SDKs/sdk-macos-13.3/root/System/Library/Frameworks -I /SDKs/sdk-macos-13.3/root/usr/include -fno-sanitize=undefined -Wno-nullability-completeness -Wno-undef-prefix -Wno-availability -Wno-expansion-to-defined" CXX="zig c++ -target x86_64-macos" AR="zig ar" RANLIB="zig ranlib" ../configure --host=x86_64-macos-darwin --prefix=$(pwd)/prebuilt/x86_64-macos-darwin --exec-prefix=$(pwd)/prebuilt/x86_64-macos-darwin | |
make | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment