-
Notifications
You must be signed in to change notification settings - Fork 240
/
Copy pathconfig.cmake
37 lines (33 loc) · 1.24 KB
/
config.cmake
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
add_definitions(-DTANGRAM_ANDROID)
if ($ENV{CIRCLECI})
# Force Ninja on CircleCI to use a specific number of concurrent jobs.
# Otherwise it guesses concurrency based on the physical CPU (which has a lot of cores!) and runs out of memory.
message(STATUS "Limiting concurrent jobs due to CI environment.")
set_property(GLOBAL APPEND PROPERTY JOB_POOLS compile_pool=4 link_pool=2)
set(CMAKE_JOB_POOL_COMPILE compile_pool)
set(CMAKE_JOB_POOL_LINK link_pool)
endif()
add_library(tangram SHARED
platforms/common/platform_gl.cpp
platforms/android/tangram/src/main/cpp/JniHelpers.cpp
platforms/android/tangram/src/main/cpp/JniOnLoad.cpp
platforms/android/tangram/src/main/cpp/AndroidPlatform.cpp
platforms/android/tangram/src/main/cpp/AndroidMap.cpp
platforms/android/tangram/src/main/cpp/NativeMap.cpp
)
if(TANGRAM_MBTILES_DATASOURCE)
target_sources(tangram PRIVATE platforms/android/tangram/src/main/cpp/sqlite3ndk.cpp)
target_include_directories(tangram PRIVATE core/deps/SQLiteCpp/sqlite3) # sqlite3ndk.cpp needs sqlite3.h
target_compile_definitions(tangram PRIVATE TANGRAM_MBTILES_DATASOURCE=1)
endif()
target_link_libraries(tangram
PRIVATE
tangram-core
# android libraries
android
atomic
GLESv2
log
z
jnigraphics
)