yolobs-studio/plugins/obs-ffmpeg/CMakeLists.txt

52 lines
1,015 B
CMake
Raw Normal View History

2016-02-23 23:16:51 +00:00
project(obs-ffmpeg)
if(MSVC)
set(obs-ffmpeg_PLATFORM_DEPS
w32-pthreads)
endif()
find_package(FFmpeg REQUIRED
COMPONENTS avcodec avfilter avdevice avutil swscale avformat swresample)
include_directories(${FFMPEG_INCLUDE_DIRS})
set(obs-ffmpeg_HEADERS
obs-ffmpeg-formats.h
obs-ffmpeg-compat.h
closest-pixel-format.h)
2019-07-27 12:47:10 +00:00
2016-02-23 23:16:51 +00:00
set(obs-ffmpeg_SOURCES
obs-ffmpeg.c
2018-02-19 19:54:37 +00:00
obs-ffmpeg-audio-encoders.c
2016-05-24 19:53:01 +00:00
obs-ffmpeg-nvenc.c
2016-02-23 23:16:51 +00:00
obs-ffmpeg-output.c
obs-ffmpeg-mux.c
obs-ffmpeg-source.c)
2019-07-27 12:47:10 +00:00
if(UNIX AND NOT APPLE)
list(APPEND obs-ffmpeg_SOURCES
obs-ffmpeg-vaapi.c)
LIST(APPEND obs-ffmpeg_PLATFORM_DEPS
${LIBVA_LBRARIES})
endif()
if(WIN32)
list(APPEND obs-ffmpeg_SOURCES
jim-nvenc.c
jim-nvenc-helpers.c)
list(APPEND obs-ffmpeg_HEADERS
jim-nvenc.h)
endif()
2016-02-23 23:16:51 +00:00
add_library(obs-ffmpeg MODULE
${obs-ffmpeg_HEADERS}
${obs-ffmpeg_SOURCES})
target_link_libraries(obs-ffmpeg
libobs
2017-06-29 19:01:10 +00:00
media-playback
2016-02-23 23:16:51 +00:00
${obs-ffmpeg_PLATFORM_DEPS}
${FFMPEG_LIBRARIES})
install_obs_plugin_with_data(obs-ffmpeg data)
add_subdirectory(ffmpeg-mux)