mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-24 19:50:38 +08:00
调整cmake
This commit is contained in:
parent
9c552128a7
commit
b5bf930467
@ -226,8 +226,21 @@ if(ENABLE_API)
|
||||
endif()
|
||||
|
||||
if (ENABLE_WEBRTC)
|
||||
#查找srtp是否安装
|
||||
find_package(SRTP QUIET)
|
||||
if (SRTP_FOUND)
|
||||
message(STATUS "found library:${SRTP_LIBRARIES}")
|
||||
include_directories(${SRTP_INCLUDE_DIRS})
|
||||
list(APPEND LINK_LIB_LIST ${SRTP_LIBRARIES})
|
||||
|
||||
add_definitions(-DENABLE_WEBRTC)
|
||||
add_subdirectory(webrtc)
|
||||
include_directories(./webrtc)
|
||||
file(GLOB SRC_WEBRTC_LIST ./webrtc/*.cpp ./webrtc/*.h ./webrtc/*.hpp)
|
||||
add_library(webrtc ${SRC_WEBRTC_LIST})
|
||||
list(APPEND LINK_LIB_LIST webrtc)
|
||||
else ()
|
||||
message(WARNING "srtp未找到, webrtc相关功能打开失败")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
if (NOT IOS)
|
||||
|
@ -32,7 +32,7 @@ set(_SRTP_ROOT_PATHS
|
||||
|
||||
find_path(SRTP_INCLUDE_DIRS
|
||||
NAMES srtp2/srtp.h
|
||||
HINTS _SRTP_ROOT_PATHS
|
||||
HINTS _SRTP_ROOT_PATHS ${SRTP_PREFIX}
|
||||
PATH_SUFFIXES include
|
||||
)
|
||||
|
||||
@ -42,7 +42,7 @@ endif()
|
||||
|
||||
find_library(SRTP_LIBRARIES
|
||||
NAMES srtp2
|
||||
HINTS ${_SRTP_ROOT_PATHS}
|
||||
HINTS ${_SRTP_ROOT_PATHS} ${SRTP_PREFIX}
|
||||
PATH_SUFFIXES bin lib
|
||||
)
|
||||
|
||||
|
@ -1,16 +0,0 @@
|
||||
list(APPEND LINK_LIB_LIST webrtc)
|
||||
#查找srtp是否安装
|
||||
find_package(SRTP QUIET)
|
||||
if (SRTP_FOUND)
|
||||
message(STATUS "found library:${SRTP_LIBRARIES}")
|
||||
include_directories(${SRTP_INCLUDE_DIRS})
|
||||
list(APPEND LINK_LIB_LIST ${SRTP_LIBRARIES})
|
||||
else ()
|
||||
message(FATAL_ERROR "srtp未找到!")
|
||||
endif ()
|
||||
|
||||
include_directories(./)
|
||||
file(GLOB SRC_LIST ./*.cpp ./*.h ./*.hpp)
|
||||
add_library(webrtc ${SRC_LIST})
|
||||
set(LINK_LIB_LIST ${LINK_LIB_LIST} PARENT_SCOPE)
|
||||
|
Loading…
Reference in New Issue
Block a user