Initial Commit
This commit is contained in:
19
thirdparty/SDL3-3.4.0/android-project/app/jni/src/Android.mk
vendored
Normal file
19
thirdparty/SDL3-3.4.0/android-project/app/jni/src/Android.mk
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE := main
|
||||
|
||||
# Add your application source files here...
|
||||
LOCAL_SRC_FILES := \
|
||||
YourSourceHere.c
|
||||
|
||||
SDL_PATH := ../SDL # SDL
|
||||
|
||||
LOCAL_C_INCLUDES := $(LOCAL_PATH)/$(SDL_PATH)/include # SDL
|
||||
|
||||
LOCAL_SHARED_LIBRARIES := SDL3
|
||||
|
||||
LOCAL_LDLIBS := -lGLESv1_CM -lGLESv2 -lOpenSLES -llog -landroid # SDL
|
||||
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
12
thirdparty/SDL3-3.4.0/android-project/app/jni/src/CMakeLists.txt
vendored
Normal file
12
thirdparty/SDL3-3.4.0/android-project/app/jni/src/CMakeLists.txt
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
cmake_minimum_required(VERSION 3.6)
|
||||
|
||||
project(my_app)
|
||||
|
||||
if(NOT TARGET SDL3::SDL3)
|
||||
find_package(SDL3 CONFIG REQUIRED)
|
||||
endif()
|
||||
|
||||
add_library(main SHARED
|
||||
YourSourceHere.c
|
||||
)
|
||||
target_link_libraries(main PRIVATE SDL3::SDL3)
|
||||
26
thirdparty/SDL3-3.4.0/android-project/app/jni/src/YourSourceHere.c
vendored
Normal file
26
thirdparty/SDL3-3.4.0/android-project/app/jni/src/YourSourceHere.c
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
#include <SDL3/SDL.h>
|
||||
#include <SDL3/SDL_main.h>
|
||||
|
||||
/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
|
||||
/* */
|
||||
/* Remove this source, and replace with your SDL sources */
|
||||
/* */
|
||||
/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
(void)argc;
|
||||
(void)argv;
|
||||
if (!SDL_Init(SDL_INIT_EVENTS | SDL_INIT_VIDEO)) {
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "SDL_Init failed (%s)", SDL_GetError());
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (!SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_INFORMATION, "Hello World",
|
||||
"!! Your SDL project successfully runs on Android !!", NULL)) {
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "SDL_ShowSimpleMessageBox failed (%s)", SDL_GetError());
|
||||
return 1;
|
||||
}
|
||||
|
||||
SDL_Quit();
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user