0322
This commit is contained in:
parent
5fd4a4d84b
commit
9e9d447523
@ -1,6 +1,7 @@
|
|||||||
cmake_minimum_required(VERSION 3.7)
|
cmake_minimum_required(VERSION 3.7)
|
||||||
|
|
||||||
set(PROJECT_NAME recive)
|
set(PROJECT_NAME rtspReceive)
|
||||||
|
#project(${PROJECT_NAME})
|
||||||
project(${PROJECT_NAME})
|
project(${PROJECT_NAME})
|
||||||
|
|
||||||
set(CMAKE_CXX_STANDARD 20)
|
set(CMAKE_CXX_STANDARD 20)
|
||||||
@ -9,16 +10,17 @@ set(CMAKE_CXX_STANDARD_REQUIRED True)
|
|||||||
add_definitions(-DLIVEMEDIA_API=)
|
add_definitions(-DLIVEMEDIA_API=)
|
||||||
add_definitions(-DNO_OPENSSL=1)
|
add_definitions(-DNO_OPENSSL=1)
|
||||||
|
|
||||||
|
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/ffmpeg)
|
||||||
|
|
||||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/includes)
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/includes)
|
||||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/includes/rtc)
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/includes/rtc)
|
||||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/includes/nlohmann)
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/includes/nlohmann)
|
||||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/includes/nlohmann/detail)
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/includes/nlohmann/detail)
|
||||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/includes/nlohmann/thirdparty)
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/includes/nlohmann/thirdparty)
|
||||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/includes/ffmpeg)
|
# include_directories(${CMAKE_CURRENT_SOURCE_DIR}/ffmpeg/ffmpeg)
|
||||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/includes/ffmpeg/libavcodec)
|
# include_directories(${CMAKE_CURRENT_SOURCE_DIR}/ffmpeg/ffmpeg/libavcodec)
|
||||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/includes/ffmpeg/libavformat)
|
# include_directories(${CMAKE_CURRENT_SOURCE_DIR}/ffmpeg/ffmpeg/libavformat)
|
||||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/includes/ffmpeg/libavutil)
|
# include_directories(${CMAKE_CURRENT_SOURCE_DIR}/ffmpeg/ffmpeg/libavutil)
|
||||||
|
|
||||||
set(LIBS_PATH ${CMAKE_CURRENT_SOURCE_DIR}/libs)
|
set(LIBS_PATH ${CMAKE_CURRENT_SOURCE_DIR}/libs)
|
||||||
|
|
||||||
@ -30,25 +32,27 @@ link_libraries(datachannel)
|
|||||||
link_libraries(json)
|
link_libraries(json)
|
||||||
|
|
||||||
# for ffmpeg
|
# for ffmpeg
|
||||||
link_directories(${LIBS_PATH}/ffmpeg)
|
link_libraries(ffmpeg)
|
||||||
link_libraries(avcodec)
|
# link_libraries(avcodec)
|
||||||
link_libraries(avdevice)
|
# link_libraries(avformat)
|
||||||
link_libraries(avutil)
|
# link_libraries(avutil)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
aux_source_directory(./src DIR_SRCS)
|
aux_source_directory(./src DIR_SRCS)
|
||||||
add_executable(${PROJECT_NAME} ${DIR_SRCS})
|
add_executable(${PROJECT_NAME} ${DIR_SRCS})
|
||||||
|
|
||||||
# shared
|
# shared
|
||||||
# find_package(Threads REQUIRED)
|
find_package(Threads REQUIRED)
|
||||||
# target_link_libraries(${PROJECT_NAME} Threads::Threads)
|
target_link_libraries(${PROJECT_NAME} Threads::Threads)
|
||||||
# target_link_libraries(${PROJECT_NAME} ws2_32)
|
target_link_libraries(${PROJECT_NAME} ws2_32)
|
||||||
|
|
||||||
|
|
||||||
# Copy dll to run dir.
|
# Copy dll to run dir.
|
||||||
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/libs/datachannel.dll DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
|
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/libs/datachannel.dll DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
|
||||||
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/libs/ffmpeg/avcodec-60.dll DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
|
#file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/libs/ffmpeg/avcodec-60.dll DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
|
||||||
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/libs/ffmpeg/avformat-60.dll DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
|
#file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/libs/ffmpeg/avformat-60.dll DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
|
||||||
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/libs/ffmpeg/avutil-58.dll DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
|
#file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/libs/ffmpeg/avutil-58.dll DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
|
||||||
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/libs/ffmpeg/postproc-57.dll DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
|
#file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/libs/ffmpeg/postproc-57.dll DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
|
||||||
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/libs/ffmpeg/swresample-4.dll DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
|
#file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/libs/ffmpeg/swresample-4.dll DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
|
||||||
|
|
||||||
|
24
ffmpeg/CMakeLists.txt
Normal file
24
ffmpeg/CMakeLists.txt
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
cmake_minimum_required(VERSION 3.4.1)
|
||||||
|
project(ffmpeg)
|
||||||
|
|
||||||
|
# set(FFMPEG_PATH ${PROJECT_SOURCE_DIR}/${ANDROID_ABI})
|
||||||
|
set(FFMPEG_PATH ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
|
|
||||||
|
|
||||||
|
add_library(ffmpeg INTERFACE)
|
||||||
|
link_directories(${FFMPEG_PATH}/libs)
|
||||||
|
target_include_directories(ffmpeg INTERFACE ${FFMPEG_PATH}/ffmpeg)
|
||||||
|
target_link_libraries(ffmpeg INTERFACE
|
||||||
|
${FFMPEG_PATH}/libs/avformat.lib
|
||||||
|
${FFMPEG_PATH}/libs/avcodec.lib
|
||||||
|
${FFMPEG_PATH}/libs/avutil.lib
|
||||||
|
${FFMPEG_PATH}/libs/swresample.lib
|
||||||
|
${FFMPEG_PATH}/libs/swscale.lib
|
||||||
|
)
|
||||||
|
# target_link_libraries(ffmpeg INTERFACE
|
||||||
|
# "${FFMPEG_PATH}/libavformat.a"
|
||||||
|
# "${FFMPEG_PATH}/libavcodec.a"
|
||||||
|
# "${FFMPEG_PATH}/libavutil.a"
|
||||||
|
# "${FFMPEG_PATH}/libswresample.a"
|
||||||
|
# "${FFMPEG_PATH}/libswscale.a"
|
||||||
|
# )
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user