1
0
mirror of https://github.com/ErnyTech-Archive/JTDLib synced 2024-11-26 20:46:47 +01:00
This commit is contained in:
Ernesto Castellotti 2018-11-21 16:03:51 +01:00
parent ae0d29022c
commit 0d6ddd5f3f

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
)