-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
executable file
·44 lines (33 loc) · 1.97 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
cmake_minimum_required(VERSION 3.14)
project(VideoSDKSessionRecorder CXX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g")
add_definitions(-std=c++11)
set(CMAKE_BUILD_TYPE Debug)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin)
find_package(PkgConfig REQUIRED)
pkg_check_modules(deps REQUIRED IMPORTED_TARGET glib-2.0)
include_directories(${CMAKE_SOURCE_DIR}/include)
include_directories(${CMAKE_SOURCE_DIR}/include/zoom_video_sdk)
include_directories(${CMAKE_SOURCE_DIR}/include/ffmpeg)
link_directories(${CMAKE_SOURCE_DIR}/lib/zoom_video_sdk)
link_directories(${CMAKE_SOURCE_DIR}/lib/ffmpeg)
add_executable(zoom_v-sdk_linux_bot ${CMAKE_SOURCE_DIR}/src/raw_data_ffmpeg_encoder.cpp ${CMAKE_SOURCE_DIR}/src/zoom_v-sdk_linux_bot.cpp )
target_link_libraries(zoom_v-sdk_linux_bot PkgConfig::deps)
target_link_libraries(zoom_v-sdk_linux_bot videosdk)
target_link_libraries(zoom_v-sdk_linux_bot z pthread avformat)
target_link_libraries(zoom_v-sdk_linux_bot z lzma swresample avcodec)
target_link_libraries(zoom_v-sdk_linux_bot avutil)
target_link_libraries(zoom_v-sdk_linux_bot swscale avfilter)
configure_file(${CMAKE_SOURCE_DIR}/config.json ${CMAKE_SOURCE_DIR}/bin/config.json COPYONLY)
file(COPY ${CMAKE_SOURCE_DIR}/lib/zoom_video_sdk/ DESTINATION ${CMAKE_SOURCE_DIR}/bin)
if(NOT EXISTS "${CMAKE_SOURCE_DIR}/lib/ffmpeg")
execute_process(COMMAND mkdir -p ${CMAKE_SOURCE_DIR}/lib/ffmpeg COMMAND tar -xf ${CMAKE_SOURCE_DIR}/lib/ffmpeg.tar.gz -C lib/ffmpeg WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
endif()
if(NOT EXISTS "${CMAKE_SOURCE_DIR}/lib/zoom_video_sdk/qt_libs")
execute_process(COMMAND tar -xf ${CMAKE_SOURCE_DIR}/lib/qt_libs.tar.gz -C lib/zoom_video_sdk WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
endif()
execute_process(COMMAND mkdir -p .zoom/logs WORKING_DIRECTORY $ENV{HOME})