Add a vendored copy of SDL
This commit is contained in:
1
vendored/sdl/android-project/app/jni/Android.mk
Normal file
1
vendored/sdl/android-project/app/jni/Android.mk
Normal file
@ -0,0 +1 @@
|
||||
include $(call all-subdir-makefiles)
|
10
vendored/sdl/android-project/app/jni/Application.mk
Normal file
10
vendored/sdl/android-project/app/jni/Application.mk
Normal file
@ -0,0 +1,10 @@
|
||||
|
||||
# Uncomment this if you're using STL in your project
|
||||
# You can find more information here:
|
||||
# https://developer.android.com/ndk/guides/cpp-support
|
||||
# APP_STL := c++_shared
|
||||
|
||||
APP_ABI := armeabi-v7a arm64-v8a x86 x86_64
|
||||
|
||||
# Min runtime API level
|
||||
APP_PLATFORM=android-16
|
20
vendored/sdl/android-project/app/jni/CMakeLists.txt
Normal file
20
vendored/sdl/android-project/app/jni/CMakeLists.txt
Normal file
@ -0,0 +1,20 @@
|
||||
cmake_minimum_required(VERSION 3.6)
|
||||
|
||||
project(GAME)
|
||||
|
||||
# armeabi-v7a requires cpufeatures library
|
||||
# include(AndroidNdkModules)
|
||||
# android_ndk_import_module_cpufeatures()
|
||||
|
||||
|
||||
# SDL sources are in a subfolder named "SDL"
|
||||
add_subdirectory(SDL)
|
||||
|
||||
# Compilation of companion libraries
|
||||
#add_subdirectory(SDL_image)
|
||||
#add_subdirectory(SDL_mixer)
|
||||
#add_subdirectory(SDL_ttf)
|
||||
|
||||
# Your game and its CMakeLists.txt are in a subfolder named "src"
|
||||
add_subdirectory(src)
|
||||
|
18
vendored/sdl/android-project/app/jni/src/Android.mk
Normal file
18
vendored/sdl/android-project/app/jni/src/Android.mk
Normal file
@ -0,0 +1,18 @@
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE := main
|
||||
|
||||
SDL_PATH := ../SDL
|
||||
|
||||
LOCAL_C_INCLUDES := $(LOCAL_PATH)/$(SDL_PATH)/include
|
||||
|
||||
# Add your application source files here...
|
||||
LOCAL_SRC_FILES := YourSourceHere.c
|
||||
|
||||
LOCAL_SHARED_LIBRARIES := SDL2
|
||||
|
||||
LOCAL_LDLIBS := -lGLESv1_CM -lGLESv2 -lOpenSLES -llog -landroid
|
||||
|
||||
include $(BUILD_SHARED_LIBRARY)
|
13
vendored/sdl/android-project/app/jni/src/CMakeLists.txt
Normal file
13
vendored/sdl/android-project/app/jni/src/CMakeLists.txt
Normal file
@ -0,0 +1,13 @@
|
||||
cmake_minimum_required(VERSION 3.6)
|
||||
|
||||
project(MY_APP)
|
||||
|
||||
find_library(SDL2 SDL2)
|
||||
|
||||
add_library(main SHARED)
|
||||
|
||||
target_sources(main PRIVATE YourSourceHere.c)
|
||||
|
||||
target_link_libraries(main SDL2)
|
||||
|
||||
|
Reference in New Issue
Block a user