From 192d2031a7249a2bad2b2fff343424f7d537d0b6 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Sun, 13 Oct 2024 18:06:27 +0100 Subject: [PATCH] try mac --- .github/workflows/build.yml | 13 +++++++++++-- raylib/build.py | 2 +- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e2384a4..706e676 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,6 +22,16 @@ jobs: with: submodules: recursive + - name: Build SDL + run: | + wget https://github.com/libsdl-org/SDL/archive/refs/tags/release-2.30.7.tar.gz + tar xvfz release-2.30.7.tar.gz + mkdir build + cd build + cmake ../SDL-release-2.30.7 -DSDL_SHARED=OFF -DSDL_STATIC=ON -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_BUILD_TYPE=Release + cmake --build . --config Release + sudo cmake --install . + - name: Setup Python uses: actions/setup-python@v2.2.2 with: @@ -36,13 +46,12 @@ jobs: cd raylib-c mkdir build cd build - cmake -DBUILD_EXAMPLES=OFF -DCUSTOMIZE_BUILD=ON -DSUPPORT_FILEFORMAT_JPG=ON -DSUPPORT_FILEFORMAT_FLAC=ON -DWITH_PIC=ON -DCMAKE_BUILD_TYPE=Release .. + cmake -DPLATFORM=SDL -DBUILD_EXAMPLES=OFF -DCUSTOMIZE_BUILD=ON -DSUPPORT_FILEFORMAT_JPG=ON -DSUPPORT_FILEFORMAT_FLAC=ON -DWITH_PIC=ON -DCMAKE_BUILD_TYPE=Release .. make -j2 sudo make install - name: Copy extras run: | - sudo cp -r raylib-c/src/external/glfw/include/GLFW /usr/local/include/ sudo cp physac/src/physac.h /usr/local/include/ sudo cp raygui/src/raygui.h /usr/local/include/ diff --git a/raylib/build.py b/raylib/build.py index 947b2dc..3f6ac30 100644 --- a/raylib/build.py +++ b/raylib/build.py @@ -162,7 +162,7 @@ def build_unix(): print("BUILDING FOR MAC") extra_link_args = [get_the_lib_path() + '/libraylib.a', '-framework', 'OpenGL', '-framework', 'Cocoa', '-framework', 'IOKit', '-framework', 'CoreFoundation', '-framework', - 'CoreVideo'] + 'CoreVideo', '-lSDL2'] libraries = [] extra_compile_args = ["-Wno-error=incompatible-function-pointer-types", "-D_CFFI_NO_LIMITED_API"] else: #platform.system() == "Linux":