代码拉取完成,页面将自动刷新
cmake_minimum_required(VERSION 3.18)
project(jitsisrtp_${JITSI_SRTP_LIBSSL_VERSION} C)
option(JITSI_SRTP_LIBSSL_VERSION "libssl version")
if (${JITSI_SRTP_LIBSSL_VERSION} MATCHES "1.1")
set(_JITSI_SRTP_LIBSSL_VERSION "1.1...2")
else ()
set(_JITSI_SRTP_LIBSSL_VERSION "${JITSI_SRTP_LIBSSL_VERSION}...99")
endif ()
if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
if (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64")
set(JNA_SYSTEM_PROCESSOR "x86-64")
elseif (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "ppc64el")
set(JNA_SYSTEM_PROCESSOR "ppc64le")
else ()
set(JNA_SYSTEM_PROCESSOR ${CMAKE_SYSTEM_PROCESSOR})
endif ()
set(CMAKE_INSTALL_PREFIX "${CMAKE_CURRENT_LIST_DIR}/src/main/resources/${CMAKE_SYSTEM_NAME}-${JNA_SYSTEM_PROCESSOR}" CACHE PATH "default install path" FORCE)
string(TOLOWER ${CMAKE_INSTALL_PREFIX} CMAKE_INSTALL_PREFIX)
message(STATUS "CMAKE_INSTALL_PREFIX not set, defaulting to >${CMAKE_INSTALL_PREFIX}<")
endif ()
find_package(OpenSSL ${_JITSI_SRTP_LIBSSL_VERSION} REQUIRED)
# TODO: CMake 3.24 will support import targets for JNI to only query JNI without AWT; use when released
find_package(JNI)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
add_library(${PROJECT_NAME} SHARED
src/main/native/JitsiCipherOpenSsl.c
src/main/native/JitsiHmacOpenSsl.c
src/main/native/JitsiOpenSslProvider.c
src/main/native/SrtpCipherGcmAuthOnlyOpenSsl.c
)
target_link_libraries(${PROJECT_NAME} PRIVATE
${JAVA_JVM_LIBRARY}
OpenSSL::Crypto
)
target_include_directories(${PROJECT_NAME} PUBLIC
${OPENSSL_INCLUDE_DIR}
${JNI_INCLUDE_DIRS}
${CMAKE_CURRENT_LIST_DIR}/target/native/javah
)
install(TARGETS ${PROJECT_NAME}
RUNTIME DESTINATION "."
LIBRARY DESTINATION "."
)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。