aae3a6a466
Status output related to OBS configuration is prefixed with the string "OBS" and added padding for enabled and disabled features. This padding was not aligned between platforms. By moving the padding and prefix decoration into its own function, both elements are controlled in a single place. CMake scripts were changed to use this new function `obs_status` instead of using CMake's `message` function directly.
39 lines
1016 B
CMake
39 lines
1016 B
CMake
project(vlc-video)
|
|
|
|
option(ENABLE_VLC "Build OBS with VLC plugin support" ${OS_LINUX})
|
|
if(NOT ENABLE_VLC)
|
|
obs_status(DISABLED "vlc-video")
|
|
obs_status(
|
|
WARNING
|
|
"VLC plugin supported is not enabled by default - please switch ENABLE_VLC to ON to enable this functionality."
|
|
)
|
|
return()
|
|
endif()
|
|
|
|
find_package(LibVLC REQUIRED)
|
|
|
|
add_library(vlc-video MODULE)
|
|
add_library(OBS::vlc-video ALIAS vlc-video)
|
|
|
|
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()
|
|
|
|
set(MODULE_DESCRIPTION "OBS VLC Plugin")
|
|
configure_file(${CMAKE_SOURCE_DIR}/cmake/bundle/windows/obs-module.rc.in
|
|
vlc-video.rc)
|
|
|
|
target_sources(vlc-video PRIVATE vlc-video.rc)
|
|
|
|
endif()
|
|
|
|
set_target_properties(vlc-video PROPERTIES FOLDER "plugins" PREFIX "")
|
|
|
|
setup_plugin_target(vlc-video)
|