2 Star 0 Fork 0

mirrors_jitsi/jitsi-srtp

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
CMakeLists.txt 1.92 KB
一键复制 编辑 原始数据 按行查看 历史
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 "."
)
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mirrors_jitsi/jitsi-srtp.git
[email protected]:mirrors_jitsi/jitsi-srtp.git
mirrors_jitsi
jitsi-srtp
jitsi-srtp
master

搜索帮助