CMakeLists.txt 778 B

123456789101112131415161718192021222324
  1. project(obs-ffmpeg-mux)
  2. option(ENABLE_FFMPEG_MUX_DEBUG "Enable FFmpeg-mux debugging" OFF)
  3. find_package(FFmpeg REQUIRED COMPONENTS avcodec avutil avformat)
  4. add_executable(obs-ffmpeg-mux)
  5. add_executable(OBS::ffmpeg-mux ALIAS obs-ffmpeg-mux)
  6. target_sources(obs-ffmpeg-mux PRIVATE ffmpeg-mux.c ffmpeg-mux.h)
  7. target_link_libraries(obs-ffmpeg-mux PRIVATE OBS::libobs FFmpeg::avcodec
  8. FFmpeg::avutil FFmpeg::avformat)
  9. if(OS_WINDOWS)
  10. target_link_libraries(obs-ffmpeg-mux PRIVATE OBS::w32-pthreads)
  11. endif()
  12. if(ENABLE_FFMPEG_MUX_DEBUG)
  13. target_compile_definitions(obs-ffmpeg-mux PRIVATE ENABLE_FFMPEG_MUX_DEBUG)
  14. endif()
  15. set_target_properties(obs-ffmpeg-mux PROPERTIES FOLDER "plugins/obs-ffmpeg")
  16. setup_binary_target(obs-ffmpeg-mux)