blob: 46b46abe0e3193be57867077b65ccea252274c1e (
plain)
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
|
# Copyright 2020-2021 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>.
if(tests)
if(WIN32 AND NOT ${CMAKE_HOST_SYSTEM_NAME} STREQUAL "Windows")
# We're building for Windows on a different operating system.
find_program(WINE
NAMES
"wine"
"wine-development"
DOC
"Wine (to run tests)"
)
if(WINE)
set(CMAKE_CROSSCOMPILING_EMULATOR ${WINE})
message(STATUS "The following Wine binary will be used to run tests: \"${WINE}\"")
else()
message(STATUS "You are cross-compiling for Windows but don't have Wine, you will not be able to run tests.")
endif()
endif()
endif()
# Qt-related performance tweaks.
add_definitions(
"-DQT_USE_FAST_CONCATENATION"
"-DQT_USE_FAST_OPERATOR_PLUS"
)
if(WIN32)
add_definitions(
"-DUNICODE"
"-DWIN32_LEAN_AND_MEAN"
)
else()
if(${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
include_directories("/usr/local/include")
link_directories("/usr/local/lib")
endif()
find_pkg(OpenSSL QUIET)
find_pkg(Qt5 QUIET)
if(NOT OpenSSL_FOUND)
if(APPLE)
# Homebrew
set(OPENSSL_ROOT_DIR "/usr/local/opt/openssl")
endif()
endif()
if(NOT Qt5_FOUND)
if(APPLE)
# Homebrew
set(Qt5_DIR "/usr/local/opt/qt5/lib/cmake/Qt5")
elseif(${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD")
set(Qt5_DIR "/usr/local/lib/qt5/cmake/Qt5")
endif()
endif()
endif()
|