summaryrefslogtreecommitdiff
path: root/akono/src/main/cpp/CMakeLists.txt
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2019-08-14 16:54:11 +0200
committerFlorian Dold <florian.dold@gmail.com>2019-08-14 16:54:11 +0200
commitf6141fd410855a82b9bbaa02a0b2634ed137843c (patch)
tree396bca4167404f7673bdf76163fd83cba9dd4c0f /akono/src/main/cpp/CMakeLists.txt
parent66eb46b1a40c088b1096ba2f294796404b1a530c (diff)
downloadakono-f6141fd410855a82b9bbaa02a0b2634ed137843c.tar.gz
akono-f6141fd410855a82b9bbaa02a0b2634ed137843c.tar.bz2
akono-f6141fd410855a82b9bbaa02a0b2634ed137843c.zip
rename library->akono
Diffstat (limited to 'akono/src/main/cpp/CMakeLists.txt')
-rw-r--r--akono/src/main/cpp/CMakeLists.txt42
1 files changed, 42 insertions, 0 deletions
diff --git a/akono/src/main/cpp/CMakeLists.txt b/akono/src/main/cpp/CMakeLists.txt
new file mode 100644
index 00000000..10d6396f
--- /dev/null
+++ b/akono/src/main/cpp/CMakeLists.txt
@@ -0,0 +1,42 @@
+cmake_minimum_required(VERSION 3.4.1)
+
+add_library(
+ akono-jni SHARED
+ akono-jni.cpp
+)
+
+set(deps_dir ${CMAKE_CURRENT_SOURCE_DIR}/../../../../deps)
+
+if(NOT EXISTS ${deps_dir})
+ message( FATAL_ERROR "Dependency directory does not exist")
+endif()
+
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++14")
+
+include_directories(
+ ${deps_dir}/android-node-v8/src
+ ${deps_dir}/android-node-v8/deps/v8/include
+ ${deps_dir}/android-node-v8/deps/uv/include
+)
+
+add_library(node SHARED IMPORTED)
+set_target_properties(node PROPERTIES IMPORTED_LOCATION
+ ${deps_dir}/compiled/${ANDROID_ABI}/libnode.so)
+
+add_library(v8 STATIC IMPORTED)
+set_target_properties(v8 PROPERTIES IMPORTED_LOCATION
+ ${deps_dir}/compiled/${ANDROID_ABI}/libv8.cr.so)
+
+add_library(v8_platform STATIC IMPORTED)
+set_target_properties(v8_platform PROPERTIES IMPORTED_LOCATION
+ ${deps_dir}/compiled/${ANDROID_ABI}/libv8_libplatform.cr.so)
+
+# Include libraries needed for hello-jni lib
+target_link_libraries(akono-jni
+ v8
+ v8_platform
+ node
+ android
+ log)
+
+