yolobs-studio/UI/frontend-plugins/frontend-tools/CMakeLists.txt

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

127 lines
2.9 KiB
CMake
Raw Normal View History

2016-10-10 19:01:40 +00:00
project(frontend-tools)
if(APPLE)
find_library(COCOA Cocoa)
include_directories(${COCOA})
endif()
2018-02-19 19:54:37 +00:00
if(UNIX AND NOT APPLE)
2017-06-29 19:01:10 +00:00
find_package(X11 REQUIRED)
link_libraries(${X11_LIBRARIES})
include_directories(${X11_INCLUDE_DIR})
2017-04-19 19:54:15 +00:00
endif()
2018-02-19 19:54:37 +00:00
include_directories(SYSTEM "${CMAKE_SOURCE_DIR}/deps/obs-scripting")
2017-04-19 19:54:15 +00:00
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/frontend-tools-config.h.in"
"${CMAKE_BINARY_DIR}/config/frontend-tools-config.h")
2016-10-10 19:01:40 +00:00
set(frontend-tools_HEADERS
2017-04-19 19:54:15 +00:00
${frontend-tools_HEADERS}
"${CMAKE_BINARY_DIR}/config/frontend-tools-config.h"
2017-06-29 19:01:10 +00:00
auto-scene-switcher.hpp
2017-04-19 19:54:15 +00:00
output-timer.hpp
tool-helpers.hpp
2018-02-19 19:54:37 +00:00
../../properties-view.hpp
../../properties-view.moc.hpp
2018-12-16 16:14:58 +00:00
../../horizontal-scroll-area.hpp
2018-02-19 19:54:37 +00:00
../../vertical-scroll-area.hpp
../../double-slider.hpp
2019-07-27 12:47:10 +00:00
../../slider-ignorewheel.hpp
../../combobox-ignorewheel.hpp
../../spinbox-ignorewheel.hpp
2016-10-10 19:01:40 +00:00
)
set(frontend-tools_SOURCES
2017-04-19 19:54:15 +00:00
${frontend-tools_SOURCES}
2017-06-29 19:01:10 +00:00
auto-scene-switcher.cpp
2016-10-10 19:01:40 +00:00
frontend-tools.c
2017-04-19 19:54:15 +00:00
output-timer.cpp
2018-02-19 19:54:37 +00:00
../../properties-view.cpp
2018-12-16 16:14:58 +00:00
../../horizontal-scroll-area.cpp
2018-02-19 19:54:37 +00:00
../../vertical-scroll-area.cpp
../../double-slider.cpp
2019-07-27 12:47:10 +00:00
../../slider-ignorewheel.cpp
../../combobox-ignorewheel.cpp
../../spinbox-ignorewheel.cpp
2016-10-10 19:01:40 +00:00
)
set(frontend-tools_UI
2017-04-19 19:54:15 +00:00
${frontend-tools_UI}
2017-06-29 19:01:10 +00:00
forms/auto-scene-switcher.ui
2017-04-19 19:54:15 +00:00
forms/output-timer.ui
2016-10-10 19:01:40 +00:00
)
2018-02-19 19:54:37 +00:00
if(SCRIPTING_ENABLED)
set(frontend-tools_HEADERS
${frontend-tools_HEADERS}
scripts.hpp
)
set(frontend-tools_SOURCES
${frontend-tools_SOURCES}
scripts.cpp
)
set(frontend-tools_UI
${frontend-tools_UI}
forms/scripts.ui
)
set(EXTRA_LIBS
${EXTRA_LIBS}
obs-scripting
)
endif()
2016-10-10 19:01:40 +00:00
if(WIN32)
2020-05-27 20:57:19 +00:00
set(MODULE_DESCRIPTION "OBS Frontend Tools")
configure_file(${CMAKE_SOURCE_DIR}/cmake/winrc/obs-module.rc.in frontend-tools.rc)
2016-10-10 19:01:40 +00:00
set(frontend-tools_PLATFORM_SOURCES
2020-05-27 20:57:19 +00:00
auto-scene-switcher-win.cpp
frontend-tools.rc)
2017-04-19 19:54:15 +00:00
if(BUILD_CAPTIONS)
set(frontend-tools_PLATFORM_SOURCES
${frontend-tools_PLATFORM_SOURCES}
captions.cpp
2017-06-29 19:01:10 +00:00
captions-handler.cpp
captions-mssapi.cpp
captions-mssapi-stream.cpp)
2017-04-19 19:54:15 +00:00
set(frontend-tools_PLATFORM_HEADERS
captions.hpp
2017-06-29 19:01:10 +00:00
captions-handler.hpp
captions-mssapi.hpp
captions-mssapi-stream.hpp)
2017-04-19 19:54:15 +00:00
set(frontend-tools_PLATFORM_UI
forms/captions.ui)
endif()
2016-10-10 19:01:40 +00:00
elseif(APPLE)
set(frontend-tools_PLATFORM_SOURCES
auto-scene-switcher-osx.mm)
set_source_files_properties(auto-scene-switcher-osx.mm
PROPERTIES COMPILE_FLAGS "-fobjc-arc")
set(frontend-tools_PLATFORM_LIBS
${COCOA})
2017-06-29 19:01:10 +00:00
else()
set(frontend-tools_PLATFORM_SOURCES
auto-scene-switcher-nix.cpp)
2016-10-10 19:01:40 +00:00
endif()
2017-04-19 19:54:15 +00:00
qt5_wrap_ui(frontend-tools_UI_HEADERS
${frontend-tools_UI}
${frontend-tools_PLATFORM_UI})
2016-10-10 19:01:40 +00:00
add_library(frontend-tools MODULE
${frontend-tools_HEADERS}
${frontend-tools_SOURCES}
${frontend-tools_UI_HEADERS}
2017-04-19 19:54:15 +00:00
${frontend-tools_PLATFORM_SOURCES}
${frontend-tools_PLATFORM_HEADERS}
2016-10-10 19:01:40 +00:00
)
target_link_libraries(frontend-tools
${frontend-tools_PLATFORM_LIBS}
2018-02-19 19:54:37 +00:00
${EXTRA_LIBS}
2016-10-10 19:01:40 +00:00
obs-frontend-api
Qt5::Widgets
libobs)
install_obs_plugin_with_data(frontend-tools data)