Fixed bug 3918 - CMake support for android project

This commit is contained in:
Sylvain Becker
2019-08-11 15:23:37 +02:00
parent 7f5fc74c57
commit 155087d106
5 changed files with 64 additions and 2 deletions

View File

@@ -0,0 +1,18 @@
cmake_minimum_required(VERSION 3.6)
project(GAME)
# Settings
set(HIDAPI OFF CACHE BOOL "" FORCE)
# armeabi-v7a requires cpufeatures library
# include(AndroidNdkModules)
# android_ndk_import_module_cpufeatures()
# SDL sources are in a subfolder named "SDL"
add_subdirectory(SDL)
# Your game and its CMakeLists.txt are in a subfolder named "src"
add_subdirectory(src)

View 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)