forked from ahnlak-blit32/32blit-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
40 lines (29 loc) · 980 Bytes
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
cmake_minimum_required(VERSION 3.9)
project(GAME)
# armeabi-v7a requires cpufeatures library
# include(AndroidNdkModules)
# android_ndk_import_module_cpufeatures()
set(SDL2IMAGE_INSTALL OFF CACHE BOOL "" FORCE) # avoid cmake error (fixed in git after 2.6.2)
set(SDL2IMAGE_SAMPLES OFF CACHE BOOL "" FORCE) # build errors (also fixed in git)
# declare/fetch libs
include(FetchContent)
FetchContent_Declare(
SDL2
GIT_REPOSITORY https://github.com/libsdl-org/SDL
GIT_TAG release-2.24.0
)
FetchContent_Declare(
SDL2_image
GIT_REPOSITORY https://github.com/libsdl-org/SDL_image
GIT_TAG release-2.6.2
)
FetchContent_Declare(
SDL2_net
GIT_REPOSITORY https://github.com/libsdl-org/SDL_net
GIT_TAG release-2.2.0
)
FetchContent_MakeAvailable(SDL2 SDL2_image SDL2_net)
# 32blit SDK is probably outside the android ROOT_PATH
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE BOTH)
# include game project
add_subdirectory(../../../ game)