-
Notifications
You must be signed in to change notification settings - Fork 146
/
Copy pathCMakeLists.txt
49 lines (40 loc) · 1.35 KB
/
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
41
42
43
44
45
46
47
48
49
# CMAKE configuration file. This file is responsible for handling the builds of all
# native code in the project and linking any native libraries as well.
# GENERAL SETTINGS
cmake_minimum_required(VERSION 3.6.0)
# CODE LOCATIONS
set(CPP_ROOT ${CMAKE_SOURCE_DIR}/src/main/cpp)
set(LIB_DST ${CMAKE_SOURCE_DIR}/libs/)
set(LIB_SRC ${PROJECT_SOURCE_DIR}/../../../sdk/android/${ANDROID_ABI})
file(COPY ${LIB_SRC} DESTINATION ${LIB_DST})
# COMPILER FLAGS
set(CMAKE_CC_FLAGS "\
-Wall \
-Wextra \
-Wno-unused-function \
-Wno-write-strings \
-Wno-unused-value \
-Wno-unused-parameter \
-Wno-unused-result \
-Wno-unused-variable \
-Wno-sign-compare \
-I${PROJECT_SOURCE_DIR}/../../../sdk \
-fPIC \
-O2")
set(CMAKE_C_FLAGS "${CMAKE_CC_FLAGS} -Wno-c99-extensions")
set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -Wno-c++11-compat-deprecated-writable-strings")
# PRE-COMPLIED THIRD PARTY LIBRARIES
add_library( libMain STATIC IMPORTED )
set_target_properties( libMain PROPERTIES IMPORTED_LOCATION ${LIB_DST}/${ANDROID_ABI}/libparsec.so )
# CLIENT LIBRARIES
set(CC_FILES
${CPP_ROOT}/bindings.c
${CPP_ROOT}/aaudio.c
)
add_library( parsec-bindings SHARED ${CC_FILES} )
target_include_directories(parsec-bindings PRIVATE
"${CPP_ROOT}/")
# LINK (Seperated by library origin)
target_link_libraries(
parsec-bindings libMain
GLESv2 z jnigraphics mediandk aaudio OpenMAXAL log android)