-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathCMakeLists.txt
86 lines (69 loc) · 2.56 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
75
76
77
78
79
80
81
82
83
84
85
86
# Copyright The Mumble Developers. All rights reserved.
# Use of this source code is governed by a BSD-style license
# that can be found in the LICENSE file at the root of the
# source tree.
cmake_minimum_required(VERSION 3.0...3.31)
set(version "1.1.0")
project(MumblePluginCppWrapper
VERSION "${version}"
DESCRIPTION "C++ wrapper of Mumble's C plugin API"
LANGUAGES "CXX"
)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
option(positional-audio "Include functions for positional audio" OFF)
option(server-event-callbacks "Include callback functions for server-events" OFF)
option(audio-callbacks "Include callback audio functions" OFF)
option(plugin-data-callbacks "Include functions for receiving network messages from other plugins" OFF)
option(key-event-callbacks "Include callback functions for key-events" OFF)
option(plugin-update "Include functions for self-updating the plugin" OFF)
option(all-callbacks "Include event callback functions" OFF)
option(all-features "Shortcut for enabling all plugin features" OFF)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
add_library(mumble_plugin_cpp_wrapper
STATIC
"src/MumblePluginDefaultImpl.cpp"
"src/plugin.cpp"
)
add_library(mumble_plugin_cpp_wrapper_api
STATIC
"src/MumbleAPI.cpp"
)
target_include_directories(mumble_plugin_cpp_wrapper PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include")
target_include_directories(mumble_plugin_cpp_wrapper_api PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include")
target_compile_definitions(mumble_plugin_cpp_wrapper_api
PUBLIC
MUMBLE_PLUGIN_NO_DEFAULT_FUNCTION_DEFINITIONS
MUMBLE_PLUGIN_NO_API_TYPEDEF
)
target_link_libraries(mumble_plugin_cpp_wrapper PUBLIC mumble_plugin_cpp_wrapper_api)
if (server-event-callbacks OR all-callbacks OR all-features)
target_compile_definitions(mumble_plugin_cpp_wrapper
PUBLIC
"MUMBLE_PLUGIN_WRAPPER_USE_SERVER_EVENT_CALLBACKS"
)
endif()
if (audio-callbacks OR all-callbacks OR all-features)
target_compile_definitions(mumble_plugin_cpp_wrapper
PUBLIC
"MUMBLE_PLUGIN_WRAPPER_USE_AUDIO_CALLBACKS"
)
endif()
if (plugin-data-callbacks OR all-callbacks OR all-features)
target_compile_definitions(mumble_plugin_cpp_wrapper
PUBLIC
"MUMBLE_PLUGIN_WRAPPER_USE_PLUGIN_DATA_FRAMEWORK_CALLBACKS"
)
endif()
if (key-event-callbacks OR all-callbacks OR all-features)
target_compile_definitions(mumble_plugin_cpp_wrapper
PUBLIC
"MUMBLE_PLUGIN_WRAPPER_USE_KEY_EVENT_CALLBACKS"
)
endif()
if (plugin-update OR all-callbacks OR all-features)
target_compile_definitions(mumble_plugin_cpp_wrapper
PUBLIC
"MUMBLE_PLUGIN_WRAPPER_USE_PLUGIN_UPDATES"
)
endif()