cmake: Replace FFMpeg modules with single module

Now using components instead of one find_package call per module
This commit is contained in:
BtbN
2014-09-23 15:26:08 +02:00
committed by jp9000
parent c9d3c6c8c1
commit 599febcb54
10 changed files with 184 additions and 323 deletions

View File

@@ -5,25 +5,9 @@ if(WIN32)
w32-pthreads)
endif()
find_package(Libavcodec REQUIRED)
include_directories(${LIBAVCODEC_INCLUDE_DIRS})
add_definitions(${LIBAVCODEC_DEFINITIONS})
find_package(Libavutil REQUIRED)
include_directories(${LIBAVUTIL_INCLUDE_DIRS})
add_definitions(${LIBAVUTIL_DEFINITIONS})
find_package(Libswscale REQUIRED)
include_directories(${LIBSWSCALE_INCLUDE_DIRS})
add_definitions(${LIBSWSCALE_DEFINITIONS})
find_package(Libavformat REQUIRED)
include_directories(${LIBAVFORMAT_INCLUDE_DIRS})
add_definitions(${LIBAVFORMAT_DEFINITIONS})
find_package(Libswresample REQUIRED)
include_directories(${LIBSWRESAMPLE_INCLUDE_DIRS})
add_definitions(${LIBSWRESAMPLE_DEFINITIONS})
find_package(FFMpeg REQUIRED
COMPONENTS avcodec avutil swscale avformat swresample)
include_directories(${FFMPEG_INCLUDE_DIRS})
set(obs-ffmpeg_HEADERS
obs-ffmpeg-formats.h
@@ -39,10 +23,6 @@ add_library(obs-ffmpeg MODULE
target_link_libraries(obs-ffmpeg
libobs
${obs-ffmpeg_PLATFORM_DEPS}
${LIBAVCODEC_LIBRARIES}
${LIBAVUTIL_LIBRARIES}
${LIBSWSCALE_LIBRARIES}
${LIBAVFORMAT_LIBRARIES}
${LIBSWRESAMPLE_LIBRARIES})
${FFMPEG_LIBRARIES})
install_obs_plugin_with_data(obs-ffmpeg data)