generated from obsproject/obs-plugintemplate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
60 lines (45 loc) · 1.41 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
cmake_minimum_required(VERSION 3.10)
project(win-audio-session-capture VERSION 0.1.0)
set(PLUGIN_AUTHOR "Cameron Blomquist")
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
if (NOT WIN32)
message(FATAL_ERROR "This is a Windows-only plugin")
endif()
include(cmake/PluginHelper.cmake)
include(cmake/FindLibObs.cmake)
find_package(LibObs REQUIRED)
configure_file(
src/plugin-macros.hpp.in
src/plugin-macros.hpp)
configure_file(
ci/ci_includes.cmd.in
ci/ci_includes.cmd)
set(PLUGIN_SOURCES
src/helpers/audio-session-helper.cpp
src/helpers/process-pipe.cpp
src/helpers/windows-helper.cpp
src/audio-capture.cpp
src/preinit.cpp
src/plugin-main.cpp)
set(PLUGIN_HEADERS
${CMAKE_CURRENT_BINARY_DIR}/src/plugin-macros.hpp
src/helpers/audio-session-helper.hpp
src/helpers/process-pipe.hpp
src/helpers/windows-helper.hpp
src/audio-capture.hpp
src/preinit.hpp)
add_library(${CMAKE_PROJECT_NAME} MODULE
${PLUGIN_SOURCES}
${PLUGIN_HEADERS})
target_include_directories(${CMAKE_PROJECT_NAME}
PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/src
PRIVATE src)
target_link_libraries(${CMAKE_PROJECT_NAME}
libobs)
# Enable Multicore Builds and disable FH4 (to not depend on VCRUNTIME140_1.DLL when building with VS2019)
if (MSVC)
add_compile_options($<$<CONFIG:Debug>:/W4> /MP /d2FH4-)
endif()
install_plugin_with_data(${CMAKE_PROJECT_NAME} "data")
add_subdirectory(src/get-audio-offsets)