2018-06-17 05:48:36 +00:00
|
|
|
project( mpw-core C )
|
|
|
|
cmake_minimum_required( VERSION 3.0.0 )
|
|
|
|
|
|
|
|
add_library( mpw SHARED
|
|
|
|
"${PROJECT_SOURCE_DIR}/../platform-independent/c/core/src/base64.c"
|
|
|
|
"${PROJECT_SOURCE_DIR}/../platform-independent/c/core/src/aes.c"
|
|
|
|
"${PROJECT_SOURCE_DIR}/../platform-independent/c/core/src/mpw-algorithm.c"
|
2019-10-23 13:25:57 +00:00
|
|
|
"${PROJECT_SOURCE_DIR}/../platform-independent/c/core/src/mpw-algorithm_v0.c"
|
|
|
|
"${PROJECT_SOURCE_DIR}/../platform-independent/c/core/src/mpw-algorithm_v1.c"
|
|
|
|
"${PROJECT_SOURCE_DIR}/../platform-independent/c/core/src/mpw-algorithm_v2.c"
|
|
|
|
"${PROJECT_SOURCE_DIR}/../platform-independent/c/core/src/mpw-algorithm_v3.c"
|
2018-06-17 05:48:36 +00:00
|
|
|
"${PROJECT_SOURCE_DIR}/../platform-independent/c/core/src/mpw-types.c"
|
|
|
|
"${PROJECT_SOURCE_DIR}/../platform-independent/c/core/src/mpw-util.c"
|
|
|
|
"${PROJECT_SOURCE_DIR}/../platform-independent/c/core/src/mpw-marshal-util.c"
|
2018-06-19 05:28:27 +00:00
|
|
|
"${PROJECT_SOURCE_DIR}/../platform-independent/c/core/src/mpw-marshal.c"
|
|
|
|
"${PROJECT_SOURCE_DIR}/../platform-independent/c/core/src/mpw-jni.c" )
|
2018-06-17 05:48:36 +00:00
|
|
|
|
|
|
|
add_library( sodium SHARED IMPORTED )
|
|
|
|
set_target_properties( sodium PROPERTIES IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../lib/libsodium/build-android~/out/lib/${ANDROID_ABI}/libsodium.so" )
|
2018-07-04 18:14:49 +00:00
|
|
|
target_include_directories( mpw PRIVATE "${PROJECT_SOURCE_DIR}/../lib/libsodium/build-android~/out/include" )
|
2018-06-17 05:48:36 +00:00
|
|
|
target_compile_definitions( mpw PRIVATE -DMPW_SODIUM=1 )
|
|
|
|
target_link_libraries( mpw PRIVATE sodium )
|
|
|
|
|
|
|
|
add_library( json-c SHARED IMPORTED )
|
|
|
|
set_target_properties( json-c PROPERTIES IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../lib/libjson-c/build-android~/out/lib/${ANDROID_ABI}/libjson-c.so" )
|
2018-07-03 15:21:48 +00:00
|
|
|
target_include_directories( mpw PRIVATE "${PROJECT_SOURCE_DIR}/../lib/libjson-c/build-android~/out/include" )
|
2018-06-17 05:48:36 +00:00
|
|
|
target_compile_definitions( mpw PRIVATE -DMPW_JSON=1 )
|
|
|
|
target_link_libraries( mpw PRIVATE json-c )
|