2016-10-10 19:01:40 +00:00
|
|
|
project(frontend-tools)
|
|
|
|
|
|
|
|
if(APPLE)
|
|
|
|
find_library(COCOA Cocoa)
|
|
|
|
include_directories(${COCOA})
|
|
|
|
endif()
|
|
|
|
|
2017-04-19 19:54:15 +00:00
|
|
|
if(WIN32 OR APPLE)
|
|
|
|
set(frontend-tools_HEADERS
|
|
|
|
auto-scene-switcher.hpp
|
|
|
|
)
|
|
|
|
set(frontend-tools_SOURCES
|
|
|
|
auto-scene-switcher.cpp
|
|
|
|
)
|
|
|
|
set(frontend-tools_UI
|
|
|
|
forms/auto-scene-switcher.ui
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
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"
|
|
|
|
output-timer.hpp
|
|
|
|
tool-helpers.hpp
|
2016-10-10 19:01:40 +00:00
|
|
|
)
|
|
|
|
set(frontend-tools_SOURCES
|
2017-04-19 19:54:15 +00:00
|
|
|
${frontend-tools_SOURCES}
|
2016-10-10 19:01:40 +00:00
|
|
|
frontend-tools.c
|
2017-04-19 19:54:15 +00:00
|
|
|
output-timer.cpp
|
2016-10-10 19:01:40 +00:00
|
|
|
)
|
|
|
|
set(frontend-tools_UI
|
2017-04-19 19:54:15 +00:00
|
|
|
${frontend-tools_UI}
|
|
|
|
forms/output-timer.ui
|
2016-10-10 19:01:40 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
if(WIN32)
|
|
|
|
set(frontend-tools_PLATFORM_SOURCES
|
|
|
|
auto-scene-switcher-win.cpp)
|
2017-04-19 19:54:15 +00:00
|
|
|
|
|
|
|
if(BUILD_CAPTIONS)
|
|
|
|
set(frontend-tools_PLATFORM_SOURCES
|
|
|
|
${frontend-tools_PLATFORM_SOURCES}
|
|
|
|
captions.cpp
|
|
|
|
captions-stream.cpp)
|
|
|
|
set(frontend-tools_PLATFORM_HEADERS
|
|
|
|
captions.hpp
|
|
|
|
captions-stream.hpp)
|
|
|
|
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})
|
|
|
|
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}
|
|
|
|
obs-frontend-api
|
|
|
|
Qt5::Widgets
|
|
|
|
libobs)
|
|
|
|
|
|
|
|
install_obs_plugin_with_data(frontend-tools data)
|