2016-06-02 00:31:43 -07:00
|
|
|
project(vlc-video)
|
|
|
|
|
2022-03-16 23:10:42 +01:00
|
|
|
option(ENABLE_VLC "Build OBS with VLC plugin support" ${OS_LINUX})
|
|
|
|
if(NOT ENABLE_VLC)
|
2022-03-25 18:51:41 +01:00
|
|
|
obs_status(DISABLED "vlc-video")
|
|
|
|
obs_status(
|
2022-03-16 23:10:42 +01:00
|
|
|
WARNING
|
2022-03-25 18:51:41 +01:00
|
|
|
"VLC plugin supported is not enabled by default - please switch ENABLE_VLC to ON to enable this functionality."
|
2022-03-16 23:10:42 +01:00
|
|
|
)
|
|
|
|
return()
|
2016-06-02 00:31:43 -07:00
|
|
|
endif()
|
|
|
|
|
2022-03-16 23:10:42 +01:00
|
|
|
find_package(LibVLC REQUIRED)
|
2016-06-02 00:31:43 -07:00
|
|
|
|
2022-03-16 23:10:42 +01:00
|
|
|
add_library(vlc-video MODULE)
|
|
|
|
add_library(OBS::vlc-video ALIAS vlc-video)
|
2016-06-02 00:31:43 -07:00
|
|
|
|
2022-03-16 23:10:42 +01:00
|
|
|
target_sources(vlc-video PRIVATE vlc-video-plugin.c vlc-video-plugin.h
|
|
|
|
vlc-video-source.c)
|
|
|
|
|
|
|
|
target_link_libraries(vlc-video PRIVATE OBS::libobs VLC::LibVLC)
|
|
|
|
|
|
|
|
if(OS_WINDOWS)
|
|
|
|
if(MSVC)
|
|
|
|
target_link_libraries(vlc-video PRIVATE OBS::w32-pthreads)
|
|
|
|
endif()
|
2016-06-02 00:31:43 -07:00
|
|
|
|
2022-03-16 23:10:42 +01:00
|
|
|
set(MODULE_DESCRIPTION "OBS VLC Plugin")
|
|
|
|
configure_file(${CMAKE_SOURCE_DIR}/cmake/bundle/windows/obs-module.rc.in
|
|
|
|
vlc-video.rc)
|
2016-06-02 00:31:43 -07:00
|
|
|
|
2022-03-16 23:10:42 +01:00
|
|
|
target_sources(vlc-video PRIVATE vlc-video.rc)
|
2016-06-02 00:31:43 -07:00
|
|
|
|
2019-06-16 21:42:58 +10:00
|
|
|
endif()
|
|
|
|
|
2022-03-16 23:10:42 +01:00
|
|
|
set_target_properties(vlc-video PROPERTIES FOLDER "plugins" PREFIX "")
|
2016-06-02 00:31:43 -07:00
|
|
|
|
2022-03-16 23:10:42 +01:00
|
|
|
setup_plugin_target(vlc-video)
|