File: CMakeLists.txt

package info (click to toggle)
unicorn-engine 2.1.4-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 23,912 kB
  • sloc: ansic: 379,830; python: 9,213; sh: 9,011; java: 8,609; ruby: 4,241; pascal: 1,805; haskell: 1,379; xml: 490; cs: 424; makefile: 348; cpp: 298; asm: 64
file content (21 lines) | stat: -rw-r--r-- 725 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
cmake_minimum_required(VERSION 3.1)

find_package(JNI)

if (JNI_FOUND)
    message (STATUS "JNI_INCLUDE_DIRS=${JNI_INCLUDE_DIRS}")
    message (STATUS "JNI_LIBRARIES=${JNI_LIBRARIES}")
else()
message(FATAL_ERROR "JNI not found, please try to update JAVA_HOME accordingly")
endif()

add_library(unicorn_java SHARED unicorn_Unicorn.c)

message("${CMAKE_CURRENT_SOURCE_DIR}/bindings/java/target/headers")

if (NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/target/headers")
    message(FATAL_ERROR "bindings/java/target/headers not generated, please generate them firstly")
endif()

target_include_directories(unicorn_java PRIVATE target/headers ${JNI_INCLUDE_DIRS})
target_link_libraries(unicorn_java PRIVATE unicorn ${JNI_LIBRARIES})