Skip to content
This repository has been archived by the owner on May 13, 2024. It is now read-only.

Commit

Permalink
Use SDL2 by default
Browse files Browse the repository at this point in the history
Except of Android and macOS, for now
  • Loading branch information
numberZero committed Nov 3, 2023
1 parent 85081d6 commit b845c5f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Build
run: |
cmake .
cmake . -DUSE_SDL2=OFF
make VERBOSE=1 -j2
- name: Test
Expand Down Expand Up @@ -52,7 +52,7 @@ jobs:
- name: Build
run: |
cmake . -DBUILD_EXAMPLES=1 -DENABLE_OPENGL=OFF -DENABLE_GLES2=ON
cmake . -DBUILD_EXAMPLES=1 -DUSE_SDL2=OFF -DENABLE_OPENGL=OFF -DENABLE_GLES2=ON
make -j2
- name: Test (headless)
Expand Down
14 changes: 10 additions & 4 deletions scripts/ci-build-mingw.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,16 @@ tmp=(
-DZLIB_LIBRARY=$libs/zlib/lib/libz.dll.a \
-DZLIB_INCLUDE_DIR=$libs/zlib/include
)
[ $with_sdl -eq 1 ] && tmp+=(
-DUSE_SDL2=ON
-DCMAKE_PREFIX_PATH=$libs/sdl2/lib/cmake
)
if [ $with_sdl -eq 1 ]; then
tmp+=(
-DUSE_SDL2=ON
-DCMAKE_PREFIX_PATH=$libs/sdl2/lib/cmake
)
else
tmp+=(
-DUSE_SDL2=OFF
)
fi
#[ $with_gl3 -eq 1 ] && tmp+=(-DENABLE_OPENGL=OFF -DENABLE_OPENGL3=ON)

cmake . "${tmp[@]}"
Expand Down
6 changes: 5 additions & 1 deletion source/Irrlicht/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
if(NOT ANDROID AND NOT APPLE)
set(DEFAULT_SDL2 ON)
endif()

option(BUILD_SHARED_LIBS "Build shared library" TRUE)
option(USE_SDL2 "Use the SDL2 backend" FALSE)
option(USE_SDL2 "Use the SDL2 backend" ${DEFAULT_SDL2})

# Compiler flags

Expand Down

0 comments on commit b845c5f

Please sign in to comment.