2016-06-02 00:31:43 -07:00
|
|
|
project(vlc-video)
|
|
|
|
|
|
|
|
if(DISABLE_VLC)
|
|
|
|
message(STATUS "VLC video plugin disabled")
|
|
|
|
return()
|
|
|
|
endif()
|
|
|
|
|
2020-04-03 20:56:48 -07:00
|
|
|
if(ENABLE_VLC)
|
|
|
|
find_package(LibVLC REQUIRED)
|
|
|
|
else()
|
|
|
|
find_package(LibVLC)
|
|
|
|
if(NOT LibVLC_FOUND)
|
|
|
|
message(STATUS "VLC video plugin disabled")
|
|
|
|
return()
|
|
|
|
endif()
|
2016-06-02 00:31:43 -07:00
|
|
|
endif()
|
|
|
|
|
|
|
|
include_directories(${LIBVLC_INCLUDE_DIRS})
|
|
|
|
add_definitions(${LIBVLC_DEFINITIONS})
|
|
|
|
|
|
|
|
if(MSVC)
|
|
|
|
set(vlc-video_PLATFORM_DEPS
|
|
|
|
w32-pthreads)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
set(vlc-video_HEADERS
|
|
|
|
vlc-video-plugin.h
|
|
|
|
)
|
|
|
|
|
|
|
|
set(vlc-video_SOURCES
|
|
|
|
vlc-video-plugin.c
|
|
|
|
vlc-video-source.c
|
|
|
|
)
|
|
|
|
|
2019-06-16 04:42:58 -07:00
|
|
|
if(WIN32)
|
|
|
|
set(MODULE_DESCRIPTION "OBS VLC module")
|
|
|
|
configure_file(${CMAKE_SOURCE_DIR}/cmake/winrc/obs-module.rc.in vlc-video.rc)
|
|
|
|
list(APPEND vlc-video_SOURCES
|
|
|
|
vlc-video.rc)
|
|
|
|
endif()
|
|
|
|
|
2016-06-02 00:31:43 -07:00
|
|
|
add_library(vlc-video MODULE
|
|
|
|
${vlc-video_SOURCES}
|
|
|
|
${vlc-video_HEADERS})
|
2020-04-03 20:56:48 -07:00
|
|
|
# instead of linking vlc we load at runtime.
|
2016-06-02 00:31:43 -07:00
|
|
|
target_link_libraries(vlc-video
|
|
|
|
libobs
|
|
|
|
${vlc-video_PLATFORM_DEPS})
|
2020-05-13 06:37:01 -07:00
|
|
|
set_target_properties(vlc-video PROPERTIES FOLDER "plugins")
|
2016-06-02 00:31:43 -07:00
|
|
|
|
|
|
|
install_obs_plugin_with_data(vlc-video data)
|