-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
/
CMakeLists.txt
74 lines (56 loc) · 2.37 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
64
65
66
67
68
69
70
71
72
73
74
cmake_minimum_required(VERSION 3.5)
project(obs-virtualcam-module)
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(_output_suffix "64")
else()
set(_output_suffix "32")
endif()
add_library(obs-virtualcam-module MODULE)
add_library(OBS::virtualcam-module ALIAS obs-virtualcam-module)
target_sources(
obs-virtualcam-module
PRIVATE sleepto.c
sleepto.h
placeholder.cpp
virtualcam-module.cpp
virtualcam-filter.cpp
virtualcam-filter.hpp
virtualcam-module.rc
../shared-memory-queue.c
../shared-memory-queue.h
../tiny-nv12-scale.c
../tiny-nv12-scale.h)
target_include_directories(obs-virtualcam-module
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/..)
set(MODULE_DESCRIPTION "OBS Virtual Camera output module")
configure_file(${CMAKE_SOURCE_DIR}/cmake/bundle/windows/obs-module.rc.in
virtualcam-module.rc)
target_sources(obs-virtualcam-module PRIVATE virtualcam-module.rc)
target_link_libraries(
obs-virtualcam-module
PRIVATE OBS::libdshowcapture OBS::libdshowcapture-external setupapi winmm
strmiids gdiplus)
target_link_options(obs-virtualcam-module PRIVATE "LINKER:/ignore:4104")
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/virtualcam-module.def.in
${CMAKE_CURRENT_BINARY_DIR}/virtualcam-module.def)
target_sources(obs-virtualcam-module
PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/virtualcam-module.def)
target_include_directories(obs-virtualcam-module
PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/../config)
target_compile_definitions(
obs-virtualcam-module
PRIVATE VIRTUALCAM_AVAILABLE UNICODE _UNICODE _CRT_SECURE_NO_WARNINGS
_CRT_NONSTDC_NO_WARNINGS)
if(MSVC)
target_compile_options(obs-virtualcam-module
PRIVATE "$<IF:$<CONFIG:Debug>,/MTd,/MT>")
add_target_resource(win-dshow "$<TARGET_PDB_FILE:obs-virtualcam-module>"
"obs-plugins/win-dshow/" OPTIONAL)
endif()
set_target_properties(obs-virtualcam-module PROPERTIES FOLDER
"plugins/win-dshow")
set_target_properties(
obs-virtualcam-module PROPERTIES OUTPUT_NAME
"obs-virtualcam-module${_output_suffix}")
add_target_resource(win-dshow "$<TARGET_FILE:obs-virtualcam-module>"
"obs-plugins/win-dshow/")