forked from mumble-voip/libmumble
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
56 lines (43 loc) · 1.21 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 2022 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
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
cmake_minimum_required(VERSION 3.18.4)
list(APPEND CMAKE_MODULE_PATH
"${CMAKE_CURRENT_SOURCE_DIR}/cmake"
)
project(libmumble)
option(build-examples "Build example client and server" OFF)
option(build-tests "Build tests" ON)
if(build-tests)
include(CTest)
endif()
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(3RDPARTY_DIR "${PROJECT_SOURCE_DIR}/3rdparty")
set(INCLUDE_DIR "${PROJECT_SOURCE_DIR}/include")
if(WIN32)
add_definitions(
"-DOS_WINDOWS"
"-DNOMINMAX"
"-DWIN32_LEAN_AND_MEAN"
"-D_CRT_SECURE_NO_WARNINGS"
)
else()
add_definitions(
"-DOS_UNIX"
)
endif()
if(MSVC)
add_compile_options(
# https://devblogs.microsoft.com/cppblog/msvc-now-correctly-reports-__cplusplus
"/Zc:__cplusplus"
)
endif()
set(QUICKPOOL_TEST OFF)
add_subdirectory("${3RDPARTY_DIR}/quickpool")
add_subdirectory("${3RDPARTY_DIR}/toml11")
add_subdirectory(src)