Skip to content

Commit 398d6a5

Browse files
committed
Add SDL3 library
1 parent cc357a8 commit 398d6a5

File tree

4 files changed

+20
-1
lines changed

4 files changed

+20
-1
lines changed

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,6 @@
2222
[submodule "ext/speexdsp"]
2323
path = ext/speexdsp
2424
url = https://github.com/xiph/speexdsp.git
25+
[submodule "ext/SDL"]
26+
path = ext/SDL
27+
url = https://github.com/libsdl-org/SDL.git

CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@ add_executable(emu
5454
${CMAKE_CURRENT_BINARY_DIR}/version.c
5555
)
5656
target_link_libraries(emu
57-
PRIVATE common ui imgui-docking imgui-toggle speex-resampler)
57+
PRIVATE common ui
58+
imgui-docking imgui-toggle speex-resampler
59+
SDL3::SDL3)
5860

5961
target_compile_definitions(emu PUBLIC CHIPS_USE_UI)
6062

ext/CMakeLists.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,16 @@ target_compile_definitions(speex-resampler PUBLIC
3838
RANDOM_PREFIX=x65_
3939
FLOATING_POINT
4040
)
41+
42+
# SDL3 options (keep the vendor build minimal)
43+
set(SDL_SHARED OFF CACHE BOOL "" FORCE)
44+
set(SDL_STATIC ON CACHE BOOL "" FORCE)
45+
set(SDL_DISABLE_INSTALL ON CACHE BOOL "" FORCE)
46+
set(SDL_TESTS OFF CACHE BOOL "" FORCE)
47+
set(SDL_EXAMPLES OFF CACHE BOOL "" FORCE)
48+
set(SDL_TEST_LIBRARY OFF CACHE BOOL "" FORCE)
49+
# don't need to show windows
50+
set(SDL_UNIX_CONSOLE_BUILD ON CACHE BOOL "" FORCE)
51+
set(SDL_VIDEO OFF CACHE BOOL "" FORCE)
52+
set(SDL_AUDIO OFF CACHE BOOL "" FORCE)
53+
add_subdirectory(SDL EXCLUDE_FROM_ALL)

ext/SDL

Submodule SDL added at a962f40

0 commit comments

Comments
 (0)