mirror of
https://github.com/minetest/irrlicht.git
synced 2024-12-26 18:50:31 +01:00
Use SDL2 by default
Except on Android and macOS, for now
This commit is contained in:
parent
854e97f57c
commit
9a439a3646
4
.github/workflows/build.yml
vendored
4
.github/workflows/build.yml
vendored
@ -21,7 +21,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
cmake .
|
cmake . -DUSE_SDL2=OFF
|
||||||
make VERBOSE=1 -j2
|
make VERBOSE=1 -j2
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
@ -52,7 +52,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
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
|
make -j2
|
||||||
|
|
||||||
- name: Test (headless)
|
- name: Test (headless)
|
||||||
|
@ -43,10 +43,14 @@ tmp=(
|
|||||||
-DZLIB_LIBRARY=$libs/zlib/lib/libz.dll.a \
|
-DZLIB_LIBRARY=$libs/zlib/lib/libz.dll.a \
|
||||||
-DZLIB_INCLUDE_DIR=$libs/zlib/include
|
-DZLIB_INCLUDE_DIR=$libs/zlib/include
|
||||||
)
|
)
|
||||||
[ $with_sdl -eq 1 ] && tmp+=(
|
if [ $with_sdl -eq 1 ]; then
|
||||||
-DUSE_SDL2=ON
|
tmp+=(
|
||||||
-DCMAKE_PREFIX_PATH=$libs/sdl2/lib/cmake
|
-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)
|
#[ $with_gl3 -eq 1 ] && tmp+=(-DENABLE_OPENGL=OFF -DENABLE_OPENGL3=ON)
|
||||||
|
|
||||||
cmake . "${tmp[@]}"
|
cmake . "${tmp[@]}"
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
|
if(NOT ANDROID AND NOT APPLE)
|
||||||
|
set(DEFAULT_SDL2 ON)
|
||||||
|
endif()
|
||||||
|
|
||||||
option(BUILD_SHARED_LIBS "Build shared library" TRUE)
|
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
|
# Compiler flags
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user