Skip to content

Commit

Permalink
revert to static sdl2
Browse files Browse the repository at this point in the history
  • Loading branch information
nesbox committed May 14, 2024
1 parent 74c8b43 commit 9321287
Showing 1 changed file with 5 additions and 17 deletions.
22 changes: 5 additions & 17 deletions cmake/sdl.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ if(BUILD_SDL AND NOT EMSCRIPTEN AND NOT RPI)
set(SDL_STATIC_PIC ON CACHE BOOL "" FORCE)
endif()

set(SDL_SHARED OFF CACHE BOOL "" FORCE)

add_subdirectory(${THIRDPARTY_DIR}/sdl2)

endif()
Expand Down Expand Up @@ -39,13 +41,7 @@ if(BUILD_SDL AND BUILD_PLAYER AND NOT RPI)
target_link_options(player-sdl PRIVATE -static)
endif()

target_link_libraries(player-sdl PRIVATE tic80core SDL2main)

if(BUILD_STATIC)
target_link_libraries(player-sdl PRIVATE SDL2-static)
else()
target_link_libraries(player-sdl PRIVATE SDL2)
endif()
target_link_libraries(player-sdl PRIVATE tic80core SDL2main SDL2-static)
endif()

################################
Expand Down Expand Up @@ -117,11 +113,7 @@ if(ANDROID)
endif()

if(NOT EMSCRIPTEN)
if(BUILD_STATIC)
target_link_libraries(sdlgpu SDL2-static)
else()
target_link_libraries(sdlgpu SDL2)
endif()
target_link_libraries(sdlgpu SDL2-static)
endif()

endif()
Expand Down Expand Up @@ -192,11 +184,7 @@ if(BUILD_SDL)
elseif(RPI)
target_link_libraries(tic80 libSDL2.a bcm_host)
else()
if(BUILD_STATIC)
target_link_libraries(tic80 SDL2-static)
else()
target_link_libraries(tic80 SDL2)
endif()
target_link_libraries(tic80 SDL2-static)
endif()
endif()

Expand Down

0 comments on commit 9321287

Please sign in to comment.