-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
CMakeLists.txt
56 lines (39 loc) · 1.3 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
# Copyright 2020 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.10)
set(version "1.0.0")
project(mumble-json-bridge
VERSION "${version}"
DESCRIPTION "A Mumble plugin that offers a JSON API for Mumble interaction via named pipes"
LANGUAGES "CXX"
)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
if ("${CMAKE_SIZEOF_VOID_P}" STREQUAL "8")
message(STATUS "Building 64bit")
else()
message(STATUS "Building non-64bit (probably 32bit)")
endif()
option(cli "Build the CLI" ON)
option(plugin "Build the Mumble plugin" ON)
option(static "Prefer static linkage" OFF)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(JSON_BuildTests OFF CACHE INTERNAL "")
set(JSON_Install OFF CACHE INTERNAL "")
set(JSON_ImplicitConversions OFF CACHE INTERNAL "")
if (static)
set(Boost_USE_STATIC_LIBS ON)
endif()
# Make sure that ctest can be run from the build dir directly and not only in certain sub-dirs inside of it
enable_testing()
add_subdirectory(3rdParty/nlohmann-json)
add_subdirectory(3rdParty/mumble-plugin-cpp)
add_subdirectory(json_bridge)
if (plugin)
add_subdirectory(plugin)
endif()
if (cli)
add_subdirectory(cli)
endif()