-
Notifications
You must be signed in to change notification settings - Fork 25
/
CMakeLists.txt
63 lines (46 loc) · 2.14 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
cmake_minimum_required(VERSION 3.24)
include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/common/bootstrap.cmake" NO_POLICY_SCOPE)
project(OBSInfoWriter VERSION 1.0.0)
option(ENABLE_FRONTEND_API "Use obs-frontend-api for UI functionality" OFF)
option(ENABLE_QT "Use Qt functionality" OFF)
include(compilerconfig)
include(defaults)
include(helpers)
add_library(${CMAKE_PROJECT_NAME} MODULE)
# Replace `com.example.obs-plugin-template` with a unique Bundle ID for macOS releases (used both in the installer and
# when submitting the installer for notarization)
set(MACOS_BUNDLEID "com.example.${CMAKE_PROJECT_NAME}")
# Replace `[email protected]` with the maintainer email address you want to put in Linux packages
set(LINUX_MAINTAINER_EMAIL "[email protected]")
# Download dependencies
set(FETCHCONTENT_TRY_FIND_PACKAGE_MODE ALWAYS)
include(FetchContent)
FetchContent_Declare(
Crosscables
OVERRIDE_FIND_PACKAGE
GIT_REPOSITORY https://github.com/partouf/Crosscables.git
GIT_TAG master)
# Add your custom source files here - header files are optional and only required for visibility e.g. in Xcode or Visual
# Studio
target_sources(
${CMAKE_PROJECT_NAME}
PRIVATE OutputFormat/OutputFormat.SRT.cpp
OutputFormat/OutputFormat.CSV.cpp
OutputFormat/OutputFormat.EDL.cpp
OutputFormat/OutputFormat.Default.cpp
InfoWriter.cpp
InfoWriterSettings.cpp
OBSStudioInfoWriter.cpp)
# Import libobs as main plugin dependency
find_package(libobs REQUIRED)
find_package(obs-frontend-api REQUIRED)
target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE OBS::obs-frontend-api)
target_compile_features(${CMAKE_PROJECT_NAME} PRIVATE cxx_std_17)
target_include_directories(${CMAKE_PROJECT_NAME} PRIVATE ${CMAKE_BINARY_DIR}/_deps/crosscables-src)
target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE Groundfloor)
find_package(Crosscables REQUIRED)
# --- Platform-independent build settings ---
target_include_directories(${CMAKE_PROJECT_NAME} PRIVATE ${CMAKE_SOURCE_DIR}/src)
target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE OBS::libobs)
# --- End of section ---
set_target_properties_plugin(${CMAKE_PROJECT_NAME} PROPERTIES OUTPUT_NAME ${_name})