CMakeLists.txt 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. cmake_minimum_required(VERSION 3.28...3.30)
  2. option(ENABLE_PLUGINS "Enable building OBS plugins" ON)
  3. if(NOT ENABLE_PLUGINS)
  4. set_property(GLOBAL APPEND PROPERTY OBS_FEATURES_DISABLED "Plugin Support")
  5. return()
  6. endif()
  7. set_property(GLOBAL APPEND PROPERTY OBS_FEATURES_ENABLED "Plugin Support")
  8. macro(check_obs_browser)
  9. if((OS_WINDOWS AND CMAKE_VS_PLATFORM_NAME MATCHES "(Win32|x64)") OR OS_MACOS OR OS_LINUX)
  10. if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/obs-browser/CMakeLists.txt")
  11. message(FATAL_ERROR "Required submodule 'obs-browser' not available.")
  12. else()
  13. add_subdirectory(obs-browser)
  14. endif()
  15. else()
  16. add_custom_target(obs-browser)
  17. target_disable(obs-browser)
  18. endif()
  19. endmacro()
  20. macro(check_obs_websocket)
  21. if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/obs-websocket/CMakeLists.txt")
  22. message(FATAL_ERROR "Required submodule 'obs-websocket' not available.")
  23. else()
  24. add_subdirectory(obs-websocket)
  25. endif()
  26. endmacro()
  27. # Add plugins in alphabetical order to retain order in IDE projects
  28. add_obs_plugin(
  29. aja
  30. PLATFORMS WINDOWS MACOS LINUX
  31. WITH_MESSAGE
  32. )
  33. add_obs_plugin(coreaudio-encoder PLATFORMS WINDOWS MACOS)
  34. add_obs_plugin(
  35. decklink
  36. PLATFORMS WINDOWS MACOS LINUX
  37. WITH_MESSAGE
  38. )
  39. add_obs_plugin(image-source)
  40. add_obs_plugin(linux-alsa PLATFORMS LINUX FREEBSD OPENBSD)
  41. add_obs_plugin(linux-capture PLATFORMS LINUX FREEBSD OPENBSD)
  42. add_obs_plugin(linux-jack PLATFORMS LINUX FREEBSD OPENBSD)
  43. add_obs_plugin(linux-pipewire PLATFORMS LINUX FREEBSD OPENBSD)
  44. add_obs_plugin(linux-pulseaudio PLATFORMS LINUX FREEBSD OPENBSD)
  45. add_obs_plugin(linux-v4l2 PLATFORMS LINUX FREEBSD OPENBSD)
  46. add_obs_plugin(mac-avcapture PLATFORMS MACOS)
  47. add_obs_plugin(mac-capture PLATFORMS MACOS)
  48. add_obs_plugin(mac-syphon PLATFORMS MACOS)
  49. add_obs_plugin(mac-videotoolbox PLATFORMS MACOS)
  50. add_obs_plugin(mac-virtualcam PLATFORMS MACOS)
  51. add_obs_plugin(nv-filters PLATFORMS WINDOWS)
  52. check_obs_browser()
  53. add_obs_plugin(obs-ffmpeg)
  54. add_obs_plugin(obs-filters)
  55. add_obs_plugin(obs-libfdk)
  56. add_obs_plugin(obs-nvenc PLATFORMS WINDOWS LINUX)
  57. add_obs_plugin(obs-outputs)
  58. add_obs_plugin(
  59. obs-qsv11
  60. PLATFORMS WINDOWS LINUX
  61. ARCHITECTURES x64 x86_64
  62. )
  63. add_obs_plugin(obs-text PLATFORMS WINDOWS)
  64. add_obs_plugin(obs-transitions)
  65. add_obs_plugin(
  66. obs-vst
  67. PLATFORMS WINDOWS MACOS LINUX
  68. WITH_MESSAGE
  69. )
  70. add_obs_plugin(obs-webrtc)
  71. check_obs_websocket()
  72. add_obs_plugin(obs-x264)
  73. add_obs_plugin(oss-audio PLATFORMS FREEBSD OPENBSD)
  74. add_obs_plugin(rtmp-services)
  75. add_obs_plugin(sndio PLATFORMS LINUX FREEBSD OPENBSD)
  76. add_obs_plugin(text-freetype2)
  77. add_obs_plugin(vlc-video WITH_MESSAGE)
  78. add_obs_plugin(win-capture PLATFORMS WINDOWS)
  79. add_obs_plugin(win-dshow PLATFORMS WINDOWS)
  80. add_obs_plugin(win-wasapi PLATFORMS WINDOWS)