2016-09-03 09:15:32 -07:00
|
|
|
project(frontend-tools)
|
|
|
|
|
|
|
|
|
|
if(APPLE)
|
|
|
|
|
find_library(COCOA Cocoa)
|
|
|
|
|
include_directories(${COCOA})
|
|
|
|
|
endif()
|
|
|
|
|
|
2017-12-02 21:50:32 -06:00
|
|
|
if(LINUX)
|
2017-05-03 05:44:10 -05:00
|
|
|
find_package(X11 REQUIRED)
|
|
|
|
|
link_libraries(${X11_LIBRARIES})
|
|
|
|
|
include_directories(${X11_INCLUDE_DIR})
|
2016-09-21 03:51:18 -05:00
|
|
|
endif()
|
|
|
|
|
|
2016-11-17 05:30:45 -08:00
|
|
|
configure_file(
|
|
|
|
|
"${CMAKE_CURRENT_SOURCE_DIR}/frontend-tools-config.h.in"
|
|
|
|
|
"${CMAKE_BINARY_DIR}/config/frontend-tools-config.h")
|
|
|
|
|
|
2016-09-03 09:15:32 -07:00
|
|
|
set(frontend-tools_HEADERS
|
2016-09-21 03:51:18 -05:00
|
|
|
${frontend-tools_HEADERS}
|
2016-11-17 05:30:45 -08:00
|
|
|
"${CMAKE_BINARY_DIR}/config/frontend-tools-config.h"
|
2017-05-03 05:44:10 -05:00
|
|
|
auto-scene-switcher.hpp
|
2016-09-21 03:51:18 -05:00
|
|
|
output-timer.hpp
|
2016-11-17 05:29:30 -08:00
|
|
|
tool-helpers.hpp
|
2016-09-03 09:15:32 -07:00
|
|
|
)
|
|
|
|
|
set(frontend-tools_SOURCES
|
2016-09-21 03:51:18 -05:00
|
|
|
${frontend-tools_SOURCES}
|
2017-05-03 05:44:10 -05:00
|
|
|
auto-scene-switcher.cpp
|
2016-09-03 09:15:32 -07:00
|
|
|
frontend-tools.c
|
2016-09-21 03:51:18 -05:00
|
|
|
output-timer.cpp
|
2016-09-03 09:15:32 -07:00
|
|
|
)
|
|
|
|
|
set(frontend-tools_UI
|
2016-09-21 03:51:18 -05:00
|
|
|
${frontend-tools_UI}
|
2017-05-03 05:44:10 -05:00
|
|
|
forms/auto-scene-switcher.ui
|
2016-09-21 03:51:18 -05:00
|
|
|
forms/output-timer.ui
|
2016-09-03 09:15:32 -07:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
if(WIN32)
|
|
|
|
|
set(frontend-tools_PLATFORM_SOURCES
|
|
|
|
|
auto-scene-switcher-win.cpp)
|
2016-11-17 05:30:45 -08:00
|
|
|
|
|
|
|
|
if(BUILD_CAPTIONS)
|
|
|
|
|
set(frontend-tools_PLATFORM_SOURCES
|
|
|
|
|
${frontend-tools_PLATFORM_SOURCES}
|
|
|
|
|
captions.cpp
|
2017-03-29 11:57:14 -07:00
|
|
|
captions-handler.cpp
|
|
|
|
|
captions-mssapi.cpp
|
2017-03-28 16:42:14 -07:00
|
|
|
captions-mssapi-stream.cpp)
|
2016-11-17 05:30:45 -08:00
|
|
|
set(frontend-tools_PLATFORM_HEADERS
|
|
|
|
|
captions.hpp
|
2017-03-29 11:57:14 -07:00
|
|
|
captions-handler.hpp
|
|
|
|
|
captions-mssapi.hpp
|
2017-03-28 16:42:14 -07:00
|
|
|
captions-mssapi-stream.hpp)
|
2016-11-17 05:30:45 -08:00
|
|
|
set(frontend-tools_PLATFORM_UI
|
|
|
|
|
forms/captions.ui)
|
|
|
|
|
endif()
|
2016-09-03 09:15:32 -07: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-05-03 05:44:10 -05:00
|
|
|
else()
|
|
|
|
|
set(frontend-tools_PLATFORM_SOURCES
|
|
|
|
|
auto-scene-switcher-nix.cpp)
|
2016-09-03 09:15:32 -07:00
|
|
|
endif()
|
|
|
|
|
|
2016-11-17 05:30:45 -08:00
|
|
|
qt5_wrap_ui(frontend-tools_UI_HEADERS
|
|
|
|
|
${frontend-tools_UI}
|
|
|
|
|
${frontend-tools_PLATFORM_UI})
|
2016-09-03 09:15:32 -07:00
|
|
|
|
|
|
|
|
add_library(frontend-tools MODULE
|
|
|
|
|
${frontend-tools_HEADERS}
|
|
|
|
|
${frontend-tools_SOURCES}
|
|
|
|
|
${frontend-tools_UI_HEADERS}
|
2016-11-17 05:30:45 -08:00
|
|
|
${frontend-tools_PLATFORM_SOURCES}
|
|
|
|
|
${frontend-tools_PLATFORM_HEADERS}
|
2016-09-03 09:15:32 -07:00
|
|
|
)
|
|
|
|
|
target_link_libraries(frontend-tools
|
|
|
|
|
${frontend-tools_PLATFORM_LIBS}
|
|
|
|
|
obs-frontend-api
|
|
|
|
|
Qt5::Widgets
|
|
|
|
|
libobs)
|
|
|
|
|
|
|
|
|
|
install_obs_plugin_with_data(frontend-tools data)
|