Skip to content

Commit ee23be1

Browse files
committed
Fixed and cleaned up workflow files.
1 parent faec699 commit ee23be1

File tree

2 files changed

+16
-18
lines changed

2 files changed

+16
-18
lines changed

.github/workflows/cmake-sdl2-android.yml

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
with:
2424
repository: 'libsdl-org/SDL'
2525
ref: 'release-2.32.4'
26-
path: 'SDLImage/SDL2'
26+
path: 'SDLImage/SDL'
2727

2828
- name: Install dependencies on Ubuntu
2929
if: matrix.os == 'ubuntu-latest'
@@ -62,7 +62,7 @@ jobs:
6262
6363
- name: Build for arm64-v8a
6464
run: |
65-
cd SDLImage/SDL2
65+
cd SDLImage/SDL
6666
cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Release \
6767
-DCMAKE_SYSTEM_NAME=Android \
6868
-DCMAKE_ANDROID_NDK=$ANDROID_NDK_HOME \
@@ -71,17 +71,15 @@ jobs:
7171
-DCMAKE_ANDROID_STL_TYPE=c++_shared \
7272
-DCMAKE_ANDROID_API=21 \
7373
-DANDROID_NDK=$ANDROID_NDK_HOME \
74-
-DSDL_STATIC=OFF \
74+
-DSDL_STATIC=ON \
7575
-DSDL_SHARED=ON \
76-
-DSDL_TEST=OFF \
7776
-S ./ \
7877
-B ./build/arm64-v8a
79-
cmake --build ./build/arm64-v8a --config Release
80-
cmake --install ./build/arm64-v8a --config Release --prefix install/arm64-v8a
78+
cmake --build ./build/arm64-v8a --config Release
8179
8280
- name: Build for x86_64
8381
run: |
84-
cd SDLImage/SDL2
82+
cd SDLImage/SDL
8583
cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Release \
8684
-DCMAKE_SYSTEM_NAME=Android \
8785
-DCMAKE_ANDROID_NDK=$ANDROID_NDK_HOME \
@@ -90,13 +88,11 @@ jobs:
9088
-DCMAKE_ANDROID_STL_TYPE=c++_shared \
9189
-DCMAKE_ANDROID_API=21 \
9290
-DANDROID_NDK=$ANDROID_NDK_HOME \
93-
-DSDL_STATIC=OFF \
91+
-DSDL_STATIC=ON \
9492
-DSDL_SHARED=ON \
95-
-DSDL_TEST=OFF \
9693
-S ./ \
9794
-B ./build/x86_64
9895
cmake --build ./build/x86_64 --config Release
99-
cmake --install ./build/x86_64 --config Release --prefix install/x86_64
10096
10197
- name: Build SDL_image for arm64-v8a
10298
run: |
@@ -108,7 +104,8 @@ jobs:
108104
-DCMAKE_ANDROID_NDK_TOOLCHAIN_VERSION=clang \
109105
-DCMAKE_ANDROID_STL_TYPE=c++_shared \
110106
-DCMAKE_ANDROID_API=21 \
111-
-DCMAKE_PREFIX_PATH="./SDL/install/arm64-v8a" \
107+
-DSDL2_INCLUDE_DIR=./SDL/include \
108+
-DSDL2_LIBRARY=./SDL/build/arm64-v8a/libSDL2.so \
112109
-S ./ \
113110
-B ./build/arm64-v8a
114111
cmake --build ./build/arm64-v8a --config Release
@@ -123,7 +120,8 @@ jobs:
123120
-DCMAKE_ANDROID_NDK_TOOLCHAIN_VERSION=clang \
124121
-DCMAKE_ANDROID_STL_TYPE=c++_shared \
125122
-DCMAKE_ANDROID_API=21 \
126-
-DCMAKE_PREFIX_PATH="./SDL/install/x86_64" \
123+
-DSDL2_INCLUDE_DIR=./SDL/include \
124+
-DSDL2_LIBRARY=./SDL/build/x86_64/libSDL2.so \
127125
-S ./ \
128126
-B ./build/x86_64
129127
cmake --build ./build/x86_64 --config Release

.github/workflows/cmake-sdl2.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,10 @@ jobs:
100100
run: |
101101
brew install libpng jpeg libtiff webp libavif
102102
103+
- name: Install Dependencies on Windows
104+
if: runner.os == 'Windows'
105+
run: choco install nasm
106+
103107
- name: Configure SDL with CMake on Linux (x86_64)
104108
if: matrix.os == 'linux' || matrix.os == 'ubuntu-latest'
105109
run: |
@@ -124,10 +128,6 @@ jobs:
124128
cmake --build ./build --config Release
125129
cmake --install ./build --config Release --prefix install
126130
127-
- name: Install NASM
128-
if: runner.os == 'Windows'
129-
run: choco install nasm
130-
131131
- name: Configure SDLImage with CMake for Linux
132132
if: matrix.os == 'ubuntu-latest' || matrix.os == 'linux'
133133
run: |
@@ -138,13 +138,13 @@ jobs:
138138
if: matrix.os == 'windows-latest'
139139
run: |
140140
cd SDLImage
141-
cmake -S ./ -B ./build -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DSDL2IMAGE_SAMPLES=OFF -DSDL2IMAGE_TESTS=OFF -A ${{ matrix.cmake-arch }} -DCMAKE_PREFIX_PATH="./SDL/install"
141+
cmake -S ./ -B ./build -A ${{ matrix.cmake-arch }} -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DSDL2IMAGE_SAMPLES=OFF -DSDL2IMAGE_TESTS=OFF -DCMAKE_PREFIX_PATH="./SDL/install"
142142
143143
- name: Configure SDLImage with CMake for macOS
144144
if: matrix.os == 'macos-latest'
145145
run: |
146146
cd SDLImage
147-
cmake -S ./ -B ./build -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DSDL2IMAGE_SAMPLES=OFF -DSDL2IMAGE_TESTS=OFF -DCMAKE_OSX_ARCHITECTURES=${{ matrix.cmake-arch }} -DCMAKE_PREFIX_PATH="./SDL/install"
147+
cmake -S ./ -B ./build -DCMAKE_OSX_ARCHITECTURES=${{ matrix.cmake-arch }} -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DSDL2IMAGE_SAMPLES=OFF -DSDL2IMAGE_TESTS=OFF -DCMAKE_PREFIX_PATH="./SDL/install"
148148
149149
- name: Build SDLImage
150150
run: |

0 commit comments

Comments
 (0)