Skip to content

Commit

Permalink
cmake: build SDL_helloworld as a shared library on Android
Browse files Browse the repository at this point in the history
  • Loading branch information
madebr committed Nov 2, 2024
1 parent 91030fb commit 6a88efd
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ else()
find_package(SDL3 CONFIG REQUIRED)
endif()

if(ANDROID)
# SDL applications need to be built as a shared library
function(add_executable TARGET)
add_library(${TARGET} SHARED ${ARGN})
endfunction()
endif()

add_executable(sdl-helloworld
main.c
)
Expand Down

0 comments on commit 6a88efd

Please sign in to comment.