@@ -3,6 +3,8 @@ project(obs-browser)
33option (ENABLE_BROWSER "Enable building OBS with browser source plugin (required Chromium Embedded Framework)"
44 ${OS_LINUX} )
55
6+ add_subdirectory (lib)
7+
68if (NOT ENABLE_BROWSER OR NOT ENABLE_UI)
79 message (STATUS "OBS: DISABLED obs-browser" )
810 message (
@@ -54,6 +56,8 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/browser-config.h.in ${CMAKE_BINARY_DI
5456target_sources (
5557 obs-browser
5658 PRIVATE obs-browser-plugin.cpp
59+ obs-browser-api-impl.cpp
60+ obs-browser-api-impl.hpp
5761 obs-browser-source .cpp
5862 obs-browser-source .hpp
5963 obs-browser-source -audio.cpp
@@ -76,13 +80,13 @@ target_sources(
7680
7781target_include_directories (obs-browser PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} /deps ${CMAKE_BINARY_DIR} /config)
7882
79- target_link_libraries (obs-browser PRIVATE OBS::libobs OBS::frontend-api nlohmann_json::nlohmann_json)
83+ target_link_libraries (obs-browser PRIVATE OBS::libobs OBS::frontend-api OBS::browser-api nlohmann_json::nlohmann_json)
8084
8185target_compile_features (obs-browser PRIVATE cxx_std_17)
8286
83- if (ENABLE_BROWSER_PANELS OR ENABLE_BROWSER_QT_LOOP)
84- find_qt(COMPONENTS Widgets)
87+ find_qt(COMPONENTS Widgets)
8588
89+ if (ENABLE_BROWSER_PANELS OR ENABLE_BROWSER_QT_LOOP)
8690 set_target_properties (
8791 obs-browser
8892 PROPERTIES AUTOMOC ON
@@ -251,6 +255,8 @@ if(ENABLE_BROWSER_PANELS)
251255
252256 target_compile_definitions (obs-browser-panels INTERFACE BROWSER_AVAILABLE)
253257
258+ target_sources (obs-browser PRIVATE obs-browser-api-impl-panel.cpp obs-browser-api-impl.cpp)
259+
254260 if (ENABLE_BROWSER_QT_LOOP)
255261 target_compile_definitions (obs-browser-panels INTERFACE ENABLE_BROWSER_QT_LOOP)
256262 endif ()
0 commit comments