Android port

This commit is contained in:
leo60228
2023-09-02 16:23:17 -04:00
committed by Misa Elizabeth Kai
parent 6e18cddc69
commit 4229372c2e
38 changed files with 6327 additions and 1 deletions

View File

@@ -127,6 +127,8 @@ endif()
# Executable information
if(WIN32)
add_executable(VVVVVV WIN32 ${VVV_SRC} icon.rc)
elseif(ANDROID)
add_library(VVVVVV SHARED ${VVV_SRC})
else()
add_executable(VVVVVV ${VVV_SRC})
endif()
@@ -189,6 +191,7 @@ set(PFS_SRC
../third_party/physfs/src/physfs_platform_unix.c
../third_party/physfs/src/physfs_platform_windows.c
../third_party/physfs/src/physfs_platform_haiku.cpp
../third_party/physfs/src/physfs_platform_android.c
)
if(APPLE)
# Are you noticing a pattern with this Apple crap yet?
@@ -400,6 +403,12 @@ elseif (EMSCRIPTEN)
target_compile_options(faudio-static PUBLIC -sUSE_SDL=2)
target_link_libraries(faudio-static -sUSE_SDL=2)
endif()
elseif (ANDROID)
message(STATUS "Using Android SDL2")
target_link_libraries(VVVVVV SDL2 SDL2main)
if(BUNDLE_DEPENDENCIES)
target_link_libraries(faudio-static SDL2)
endif()
else()
# Only try to autodetect if both SDL2 variables aren't explicitly set
find_package(SDL2 CONFIG)