1
0
forked from ErnyTech/JTDLib
This commit is contained in:
Ernesto Castellotti 2018-11-21 16:03:51 +01:00
parent 5db651dfc8
commit 82ce53a57c

View File

@ -0,0 +1,22 @@
cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
project(JTDLib VERSION 1.0 LANGUAGES CXX)
if (NOT JNI_FOUND)
find_package(JNI REQUIRED)
endif()
add_subdirectory(td)
add_library(tdjni SHARED
td_jni.cpp
)
target_include_directories(tdjni PRIVATE ${JAVA_INCLUDE_PATH} ${JAVA_INCLUDE_PATH2})
target_link_libraries(tdjni PRIVATE Td::TdStatic ${JAVA_JVM_LIBRARY})
target_compile_definitions(tdjni PRIVATE PACKAGE_NAME="${TD_API_JAVA_PACKAGE}")
set_property(TARGET tdjni PROPERTY CXX_STANDARD 14)
install(TARGETS tdjni
LIBRARY DESTINATION bin
RUNTIME DESTINATION bin
)