mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-07-05 11:03:31 +00:00
UI,shared: Move OBSPlainTextEdit to its own directory
This commit is contained in:
parent
85651a7d4b
commit
0bd6e0ba8a
|
@ -71,6 +71,10 @@ find_package(CURL REQUIRED)
|
|||
add_subdirectory(frontend-plugins)
|
||||
add_executable(obs)
|
||||
|
||||
if(NOT TARGET OBS::qt-plain-text-edit)
|
||||
add_subdirectory("${CMAKE_SOURCE_DIR}/shared/qt/plain-text-edit" "${CMAKE_BINARY_DIR}/shared/qt/plain-text-edit")
|
||||
endif()
|
||||
|
||||
if(NOT TARGET OBS::qt-wrappers)
|
||||
add_subdirectory("${CMAKE_SOURCE_DIR}/shared/qt/wrappers" "${CMAKE_BINARY_DIR}/shared/qt/wrappers")
|
||||
endif()
|
||||
|
@ -195,8 +199,6 @@ target_sources(
|
|||
menu-button.hpp
|
||||
mute-checkbox.hpp
|
||||
noncheckable-button.hpp
|
||||
plain-text-edit.cpp
|
||||
plain-text-edit.hpp
|
||||
properties-view.cpp
|
||||
properties-view.hpp
|
||||
properties-view.moc.hpp
|
||||
|
@ -316,7 +318,8 @@ target_link_libraries(
|
|||
FFmpeg::avformat
|
||||
OBS::libobs
|
||||
OBS::frontend-api
|
||||
OBS::qt-wrappers)
|
||||
OBS::qt-wrappers
|
||||
OBS::qt-plain-text-edit)
|
||||
|
||||
set_target_properties(obs PROPERTIES FOLDER "frontend")
|
||||
|
||||
|
|
|
@ -9,8 +9,6 @@ target_sources(
|
|||
double-slider.hpp
|
||||
horizontal-scroll-area.cpp
|
||||
horizontal-scroll-area.hpp
|
||||
plain-text-edit.cpp
|
||||
plain-text-edit.hpp
|
||||
properties-view.cpp
|
||||
properties-view.hpp
|
||||
properties-view.moc.hpp
|
||||
|
@ -26,6 +24,12 @@ target_compile_options(obs-ui-support INTERFACE $<$<PLATFORM_ID:Linux>:-Wno-erro
|
|||
|
||||
target_link_libraries(obs-studio PRIVATE OBS::ui-support)
|
||||
|
||||
if(NOT TARGET OBS::qt-plain-text-edit)
|
||||
add_subdirectory("${CMAKE_SOURCE_DIR}/shared/qt/plain-text-edit" "${CMAKE_BINARY_DIR}/shared/qt/plain-text-edit")
|
||||
endif()
|
||||
|
||||
target_link_libraries(obs-studio PRIVATE OBS::qt-plain-text-edit)
|
||||
|
||||
target_sources(
|
||||
obs-studio
|
||||
PRIVATE # cmake-format: sortable
|
||||
|
|
|
@ -23,6 +23,10 @@ if(NOT TARGET OBS::aja-support)
|
|||
add_subdirectory("${CMAKE_SOURCE_DIR}/plugins/aja" "${CMAKE_BINARY_DIR}/plugins/aja")
|
||||
endif()
|
||||
|
||||
if(NOT TARGET OBS::qt-plain-text-edit)
|
||||
add_subdirectory("${CMAKE_SOURCE_DIR}/shared/qt/plain-text-edit" "${CMAKE_BINARY_DIR}/shared/qt/plain-text-edit")
|
||||
endif()
|
||||
|
||||
if(NOT TARGET OBS::qt-wrappers)
|
||||
add_subdirectory("${CMAKE_SOURCE_DIR}/shared/qt/wrappers" "${CMAKE_BINARY_DIR}/shared/qt/wrappers")
|
||||
endif()
|
||||
|
@ -44,6 +48,7 @@ target_link_libraries(
|
|||
PRIVATE OBS::libobs
|
||||
OBS::aja-support
|
||||
OBS::frontend-api
|
||||
OBS::qt-plain-text-edit
|
||||
OBS::qt-wrappers
|
||||
OBS::ui-support
|
||||
Qt::Widgets
|
||||
|
|
|
@ -9,6 +9,10 @@ find_package(LibAJANTV2 REQUIRED)
|
|||
add_library(aja-output-ui MODULE)
|
||||
add_library(OBS::aja-output-ui ALIAS aja-output-ui)
|
||||
|
||||
if(NOT TARGET OBS::qt-plain-text-edit)
|
||||
add_subdirectory("${CMAKE_SOURCE_DIR}/shared/qt/plain-text-edit" "${CMAKE_BINARY_DIR}/shared/qt/plain-text-edit")
|
||||
endif()
|
||||
|
||||
if(NOT TARGET OBS::qt-wrappers)
|
||||
add_subdirectory("${CMAKE_SOURCE_DIR}/shared/qt/wrappers" "${CMAKE_BINARY_DIR}/shared/qt/wrappers")
|
||||
endif()
|
||||
|
@ -52,8 +56,6 @@ target_sources(
|
|||
${CMAKE_SOURCE_DIR}/plugins/aja/aja-widget-io.hpp
|
||||
${CMAKE_SOURCE_DIR}/UI/double-slider.cpp
|
||||
${CMAKE_SOURCE_DIR}/UI/double-slider.hpp
|
||||
${CMAKE_SOURCE_DIR}/UI/plain-text-edit.hpp
|
||||
${CMAKE_SOURCE_DIR}/UI/plain-text-edit.cpp
|
||||
${CMAKE_SOURCE_DIR}/UI/properties-view.hpp
|
||||
${CMAKE_SOURCE_DIR}/UI/properties-view.cpp
|
||||
${CMAKE_SOURCE_DIR}/UI/properties-view.moc.hpp
|
||||
|
@ -64,7 +66,8 @@ target_sources(
|
|||
${CMAKE_SOURCE_DIR}/UI/vertical-scroll-area.cpp
|
||||
${CMAKE_SOURCE_DIR}/UI/vertical-scroll-area.hpp)
|
||||
|
||||
target_link_libraries(aja-output-ui PRIVATE OBS::libobs OBS::frontend-api OBS::qt-wrappers Qt::Widgets AJA::LibAJANTV2)
|
||||
target_link_libraries(aja-output-ui PRIVATE OBS::libobs OBS::frontend-api OBS::qt-wrappers OBS::qt-plain-text-edit
|
||||
Qt::Widgets AJA::LibAJANTV2)
|
||||
|
||||
if(OS_MACOS)
|
||||
find_library(IOKIT_FRAMEWORK Iokit)
|
||||
|
|
|
@ -20,6 +20,10 @@ endif()
|
|||
add_library(decklink-output-ui MODULE)
|
||||
add_library(OBS::decklink-output-ui ALIAS decklink-output-ui)
|
||||
|
||||
if(NOT TARGET OBS::qt-plain-text-edit)
|
||||
add_subdirectory("${CMAKE_SOURCE_DIR}/shared/qt/plain-text-edit" "${CMAKE_BINARY_DIR}/shared/qt/plain-text-edit")
|
||||
endif()
|
||||
|
||||
if(NOT TARGET OBS::qt-wrappers)
|
||||
add_subdirectory("${CMAKE_SOURCE_DIR}/shared/qt/wrappers" "${CMAKE_BINARY_DIR}/shared/qt/wrappers")
|
||||
endif()
|
||||
|
@ -35,6 +39,7 @@ target_link_libraries(
|
|||
decklink-output-ui
|
||||
PRIVATE OBS::libobs
|
||||
OBS::frontend-api
|
||||
OBS::qt-plain-text-edit
|
||||
OBS::qt-wrappers
|
||||
OBS::ui-support
|
||||
Qt::Widgets
|
||||
|
|
|
@ -7,6 +7,10 @@ endif()
|
|||
add_library(decklink-output-ui MODULE)
|
||||
add_library(OBS::decklink-output-ui ALIAS decklink-output-ui)
|
||||
|
||||
if(NOT TARGET OBS::qt-plain-text-edit)
|
||||
add_subdirectory("${CMAKE_SOURCE_DIR}/shared/qt/plain-text-edit" "${CMAKE_BINARY_DIR}/shared/qt/plain-text-edit")
|
||||
endif()
|
||||
|
||||
if(NOT TARGET OBS::qt-wrappers)
|
||||
add_subdirectory("${CMAKE_SOURCE_DIR}/shared/qt/wrappers" "${CMAKE_BINARY_DIR}/shared/qt/wrappers")
|
||||
endif()
|
||||
|
@ -34,8 +38,6 @@ target_sources(
|
|||
decklink-ui-main.h
|
||||
${CMAKE_SOURCE_DIR}/UI/double-slider.cpp
|
||||
${CMAKE_SOURCE_DIR}/UI/double-slider.hpp
|
||||
${CMAKE_SOURCE_DIR}/UI/plain-text-edit.hpp
|
||||
${CMAKE_SOURCE_DIR}/UI/plain-text-edit.cpp
|
||||
${CMAKE_SOURCE_DIR}/UI/properties-view.hpp
|
||||
${CMAKE_SOURCE_DIR}/UI/properties-view.cpp
|
||||
${CMAKE_SOURCE_DIR}/UI/properties-view.moc.hpp
|
||||
|
@ -46,7 +48,8 @@ target_sources(
|
|||
${CMAKE_SOURCE_DIR}/UI/vertical-scroll-area.hpp
|
||||
${CMAKE_SOURCE_DIR}/UI/vertical-scroll-area.cpp)
|
||||
|
||||
target_link_libraries(decklink-output-ui PRIVATE OBS::libobs OBS::frontend-api OBS::qt-wrappers Qt::Widgets)
|
||||
target_link_libraries(decklink-output-ui PRIVATE OBS::libobs OBS::frontend-api OBS::qt-wrappers OBS::qt-plain-text-edit
|
||||
Qt::Widgets)
|
||||
|
||||
target_compile_features(decklink-output-ui PRIVATE cxx_std_17)
|
||||
|
||||
|
|
|
@ -14,6 +14,10 @@ endif()
|
|||
add_library(frontend-tools MODULE)
|
||||
add_library(OBS::frontend-tools ALIAS frontend-tools)
|
||||
|
||||
if(NOT TARGET OBS::qt-plain-text-edit)
|
||||
add_subdirectory("${CMAKE_SOURCE_DIR}/shared/qt/plain-text-edit" "${CMAKE_BINARY_DIR}/shared/qt/plain-text-edit")
|
||||
endif()
|
||||
|
||||
if(NOT TARGET OBS::qt-wrappers)
|
||||
add_subdirectory("${CMAKE_SOURCE_DIR}/shared/qt/wrappers" "${CMAKE_BINARY_DIR}/shared/qt/wrappers")
|
||||
endif()
|
||||
|
@ -49,6 +53,7 @@ target_link_libraries(
|
|||
frontend-tools
|
||||
PRIVATE OBS::frontend-api
|
||||
OBS::libobs
|
||||
OBS::qt-plain-text-edit
|
||||
OBS::qt-wrappers
|
||||
OBS::ui-support
|
||||
Qt::Widgets
|
||||
|
|
|
@ -3,6 +3,10 @@ project(frontend-tools)
|
|||
add_library(frontend-tools MODULE)
|
||||
add_library(OBS::frontend-tools ALIAS frontend-tools)
|
||||
|
||||
if(NOT TARGET OBS::qt-plain-text-edit)
|
||||
add_subdirectory("${CMAKE_SOURCE_DIR}/shared/qt/plain-text-edit" "${CMAKE_BINARY_DIR}/shared/qt/plain-text-edit")
|
||||
endif()
|
||||
|
||||
if(NOT TARGET OBS::qt-wrappers)
|
||||
add_subdirectory("${CMAKE_SOURCE_DIR}/shared/qt/wrappers" "${CMAKE_BINARY_DIR}/shared/qt/wrappers")
|
||||
endif()
|
||||
|
@ -43,13 +47,12 @@ target_sources(
|
|||
${CMAKE_SOURCE_DIR}/UI/slider-ignorewheel.cpp
|
||||
${CMAKE_SOURCE_DIR}/UI/slider-ignorewheel.hpp
|
||||
${CMAKE_SOURCE_DIR}/UI/vertical-scroll-area.hpp
|
||||
${CMAKE_SOURCE_DIR}/UI/vertical-scroll-area.cpp
|
||||
${CMAKE_SOURCE_DIR}/UI/plain-text-edit.cpp
|
||||
${CMAKE_SOURCE_DIR}/UI/plain-text-edit.hpp)
|
||||
${CMAKE_SOURCE_DIR}/UI/vertical-scroll-area.cpp)
|
||||
|
||||
target_compile_features(frontend-tools PRIVATE cxx_std_17)
|
||||
|
||||
target_link_libraries(frontend-tools PRIVATE OBS::frontend-api OBS::qt-wrappers OBS::libobs Qt::Widgets)
|
||||
target_link_libraries(frontend-tools PRIVATE OBS::frontend-api OBS::qt-wrappers OBS::qt-plain-text-edit OBS::libobs
|
||||
Qt::Widgets)
|
||||
|
||||
if(OS_POSIX AND NOT OS_MACOS)
|
||||
target_link_libraries(frontend-tools PRIVATE Qt::GuiPrivate)
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#include "obs-module.h"
|
||||
#include "scripts.hpp"
|
||||
#include "../../properties-view.hpp"
|
||||
#include "../../plain-text-edit.hpp"
|
||||
|
||||
#include <QFileDialog>
|
||||
#include <QHBoxLayout>
|
||||
|
@ -18,6 +17,7 @@
|
|||
#include <QUrl>
|
||||
#include <QDesktopServices>
|
||||
#include <qt-wrappers.hpp>
|
||||
#include <plain-text-edit.hpp>
|
||||
|
||||
#include <obs.hpp>
|
||||
#include <obs-module.h>
|
||||
|
|
|
@ -29,10 +29,10 @@
|
|||
#include "spinbox-ignorewheel.hpp"
|
||||
#include "properties-view.hpp"
|
||||
#include "properties-view.moc.hpp"
|
||||
#include "plain-text-edit.hpp"
|
||||
#include "obs-app.hpp"
|
||||
|
||||
#include <qt-wrappers.hpp>
|
||||
#include <plain-text-edit.hpp>
|
||||
#include <cstdlib>
|
||||
#include <initializer_list>
|
||||
#include <obs-data.h>
|
||||
|
|
11
shared/qt/plain-text-edit/CMakeLists.txt
Normal file
11
shared/qt/plain-text-edit/CMakeLists.txt
Normal file
|
@ -0,0 +1,11 @@
|
|||
cmake_minimum_required(VERSION 3.22...3.25)
|
||||
|
||||
find_package(Qt6 REQUIRED Core Widgets)
|
||||
|
||||
add_library(qt-plain-text-edit INTERFACE)
|
||||
add_library(OBS::qt-plain-text-edit ALIAS qt-plain-text-edit)
|
||||
|
||||
target_sources(qt-plain-text-edit INTERFACE plain-text-edit.cpp plain-text-edit.hpp)
|
||||
target_include_directories(qt-plain-text-edit INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
|
||||
target_link_libraries(qt-plain-text-edit INTERFACE Qt::Core Qt::Widgets)
|
|
@ -1,4 +1,4 @@
|
|||
#include "plain-text-edit.hpp"
|
||||
#include <plain-text-edit.hpp>
|
||||
#include <QFontDatabase>
|
||||
|
||||
OBSPlainTextEdit::OBSPlainTextEdit(QWidget *parent, bool monospace)
|
Loading…
Reference in a new issue