Skip to content

Commit

Permalink
add android native cmakelists
Browse files Browse the repository at this point in the history
  • Loading branch information
takenagain committed Jan 21, 2025
1 parent 4df83d0 commit f48e35d
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
cmake_minimum_required(VERSION 3.15)

# Project-level configuration.
set(PROJECT_NAME "komodo_defi_framework")
project(${PROJECT_NAME} LANGUAGES CXX)

find_library(log-lib log)
find_package(ZLIB)

set(IMPORT_DIR ${CMAKE_SOURCE_DIR}/libs)

# Shared library
set(PLUGIN_NAME "${PROJECT_NAME}_plugin")

# Invoke the build for native code shared with the other target platforms.
# This can be changed to accommodate different builds.
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/../../../../../src" "${CMAKE_CURRENT_BINARY_DIR}/shared")

set(komodo_defi_framework_bundled_libraries

# Defined in ../src/CMakeLists.txt.
# This can be changed to accommodate different builds.
$<TARGET_FILE:komodo_defi_framework>
${IMPORT_DIR}/${ANDROID_ABI}/libmm2.a
PARENT_SCOPE
)

Original file line number Diff line number Diff line change
Expand Up @@ -235,17 +235,27 @@ List<String> _getLibraryPaths() {
return [
'kdf',
'mm2',
'Frameworks/libkdflib.a',
'komodo_defi_framework/Frameworks/libkdflib.a',
'libkdflib.dylib',
'libkdflib.a',
'PROCESS',
'EXECUTABLE',
];
} else if (Platform.isIOS) {
return ['libkdflib.dylib'];
return [
'libkdflib.dylib',
'PROCESS',
'EXECUTABLE',
];
} else if (Platform.isAndroid) {
return ['libkdflib.so', 'libkdflib_static.so'];
return [
'libkomodo_defi_framework.so',
'komodo_defi_framework.so',
'komodo_defi_framework_plugin.so',
'libkomodo_defi_framework_plugin.so',
'libkdflib.so',
'libkdflib_static.so',
'EXECUTABLE',
'PROCESS',
];
} else if (Platform.isWindows) {
return ['kdflib.dll', 'kdflib_static.dll'];
} else if (Platform.isLinux) {
Expand Down

0 comments on commit f48e35d

Please sign in to comment.