1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

SRT: Support debug and run with CLion. v4.0.249

This commit is contained in:
winlin 2022-03-17 08:42:44 +08:00
parent ab81696102
commit c5cc79ee6f
4 changed files with 20 additions and 4 deletions

View file

@ -1,5 +1,6 @@
cmake_minimum_required(VERSION 2.8.12)
project(srs CXX)
set (CMAKE_CXX_STANDARD 11)
###########################################################
execute_process(
@ -16,7 +17,7 @@ ProcessorCount(JOBS)
# We should always configure SRS for switching between branches.
IF (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
EXEC_PROGRAM("cd ${SRS_DIR} && ./configure --osx --jobs=${JOBS}")
EXEC_PROGRAM("cd ${SRS_DIR} && ./configure --osx --srt=on --jobs=${JOBS}")
ELSE ()
EXEC_PROGRAM("cd ${SRS_DIR} && ./configure --jobs=${JOBS}")
ENDIF ()
@ -28,7 +29,8 @@ set(DEPS_LIBS ${SRS_DIR}/objs/st/libst.a
${SRS_DIR}/objs/ffmpeg/lib/libavcodec.a
${SRS_DIR}/objs/ffmpeg/lib/libavutil.a
${SRS_DIR}/objs/opus/lib/libopus.a
${SRS_DIR}/objs/ffmpeg/lib/libswresample.a)
${SRS_DIR}/objs/ffmpeg/lib/libswresample.a
${SRS_DIR}/objs/srt/lib/libsrt.a)
foreach(DEPS_LIB ${DEPS_LIBS})
IF (NOT EXISTS ${DEPS_LIB})
MESSAGE(FATAL_ERROR "${DEPS_LIB} not found")
@ -45,17 +47,23 @@ INCLUDE_DIRECTORIES(${SRS_DIR}/objs
${SRS_DIR}/objs/srtp2/include
${SRS_DIR}/objs/opus/include
${SRS_DIR}/objs/ffmpeg/include
${SRS_DIR}/objs/srt/include
${SRS_DIR}/src/core
${SRS_DIR}/src/kernel
${SRS_DIR}/src/protocol
${SRS_DIR}/src/app
${SRS_DIR}/src/service)
${SRS_DIR}/src/service
${SRS_DIR}/src/srt)
set(SOURCE_FILES ${SRS_DIR}/src/main/srs_main_server.cpp)
AUX_SOURCE_DIRECTORY(${SRS_DIR}/src/core SOURCE_FILES)
AUX_SOURCE_DIRECTORY(${SRS_DIR}/src/kernel SOURCE_FILES)
AUX_SOURCE_DIRECTORY(${SRS_DIR}/src/protocol SOURCE_FILES)
AUX_SOURCE_DIRECTORY(${SRS_DIR}/src/app SOURCE_FILES)
AUX_SOURCE_DIRECTORY(${SRS_DIR}/src/srt SOURCE_FILES)
# Remove the duplicated main.
list(REMOVE_ITEM SOURCE_FILES ${SRS_DIR}/src/srt/ts_demux_test.cpp)
ADD_DEFINITIONS("-g -O0")