blob: 479b7c131c3933b5b5fa45f07462adb728a05f7e (
plain) (
blame)
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
|
################################################################
# A minimal CMake file that is compatible with sbt-jni #
# #
# All settings required by sbt-jni have been marked so, please #
# add/modify/remove settings to build your specific library. #
################################################################
cmake_minimum_required(VERSION 2.8.0)
# Define project and related variables
# (required by sbt-jni) please use semantic versioning
#
project (demo)
set(PROJECT_VERSION_MAJOR 0)
set(PROJECT_VERSION_MINOR 0)
set(PROJECT_VERSION_PATCH 0)
# Setup JNI
find_package(JNI REQUIRED)
if (JNI_FOUND)
message (STATUS "JNI include directories: ${JNI_INCLUDE_DIRS}")
endif()
# Include directories
include_directories(.)
include_directories(../../core/target/native/include)
include_directories(${JNI_INCLUDE_DIRS})
# Sources
file(GLOB LIB_SRC
"*.c"
"*.cpp"
)
# Setup installation targets
# (required by sbt-jni) major version should always be appended to library name
#
set (LIB_NAME ${PROJECT_NAME}${PROJECT_VERSION_MAJOR})
add_library(${LIB_NAME} SHARED ${LIB_SRC})
install(TARGETS ${LIB_NAME} LIBRARY DESTINATION .)
|