整理cmake

This commit is contained in:
ziyue 2022-08-01 16:12:52 +08:00
parent 98f158bf31
commit 13dd8c699b
3 changed files with 28 additions and 22 deletions

View File

@ -344,7 +344,8 @@ if(OPENSSL_FOUND AND ENABLE_OPENSSL)
endif() endif()
else() else()
set(ENABLE_OPENSSL OFF) set(ENABLE_OPENSSL OFF)
message(WARNING "openssl 未找到, rtmp 将不支持 flash 播放器, https/wss/rtsps/rtmps 也将失效") set(ENABLE_WEBRTC OFF)
message(WARNING "openssl 未找到, rtmp 将不支持 flash 播放器, https/wss/rtsps/rtmps/webrtc 也将失效")
endif() endif()
# mysql # mysql
@ -428,24 +429,30 @@ if(ENABLE_API)
endif() endif()
# IOS # IOS
if(NOT IOS) if(IOS)
return()
endif()
##############################################################################
if(ENABLE_PLAYER AND ENABLE_FFMPEG) if(ENABLE_PLAYER AND ENABLE_FFMPEG)
add_subdirectory(player) add_subdirectory(player)
endif() endif()
#MediaServer
add_subdirectory(server) add_subdirectory(server)
# Android add_subdirectory # Android add_subdirectory
if(ENABLE_SERVER_LIB) if(ENABLE_SERVER_LIB)
set(MK_LINK_LIBRARIES ${MK_LINK_LIBRARIES} PARENT_SCOPE) set(MK_LINK_LIBRARIES ${MK_LINK_LIBRARIES} PARENT_SCOPE)
endif() endif()
# #cppdemo
file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/www"
DESTINATION ${EXECUTABLE_OUTPUT_PATH})
file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/conf/config.ini"
DESTINATION ${EXECUTABLE_OUTPUT_PATH})
if (ENABLE_TESTS) if (ENABLE_TESTS)
add_subdirectory(tests) add_subdirectory(tests)
endif () endif ()
endif()
# www
file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/www" DESTINATION ${EXECUTABLE_OUTPUT_PATH})
file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/conf/config.ini" DESTINATION ${EXECUTABLE_OUTPUT_PATH})
file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/default.pem" DESTINATION ${EXECUTABLE_OUTPUT_PATH})

View File

@ -21,7 +21,6 @@
# SOFTWARE. # SOFTWARE.
# #
execute_process(COMMAND cp ${CMAKE_CURRENT_SOURCE_DIR}/default.pem ${EXECUTABLE_OUTPUT_PATH}/)
aux_source_directory(. TEST_SRC_LIST) aux_source_directory(. TEST_SRC_LIST)
foreach(TEST_SRC ${TEST_SRC_LIST}) foreach(TEST_SRC ${TEST_SRC_LIST})