diff options
Diffstat (limited to 'cmake/Dependencies.cmake')
-rw-r--r-- | cmake/Dependencies.cmake | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/cmake/Dependencies.cmake b/cmake/Dependencies.cmake new file mode 100644 index 00000000..338a4193 --- /dev/null +++ b/cmake/Dependencies.cmake | |||
@@ -0,0 +1,56 @@ | |||
1 | ############################################################################### | ||
2 | # | ||
3 | # :: For UNIX-like systems that have pkg-config. | ||
4 | # | ||
5 | ############################################################################### | ||
6 | |||
7 | include(ModulePackage) | ||
8 | |||
9 | find_package(Threads REQUIRED) | ||
10 | |||
11 | find_library(NCURSES_LIBRARIES ncurses ) | ||
12 | find_library(UTIL_LIBRARIES util ) | ||
13 | find_library(RT_LIBRARIES rt ) | ||
14 | |||
15 | # For toxcore. | ||
16 | pkg_use_module(LIBSODIUM libsodium ) | ||
17 | |||
18 | # For toxav. | ||
19 | pkg_use_module(OPUS opus ) | ||
20 | pkg_use_module(VPX vpx ) | ||
21 | |||
22 | # For tox-bootstrapd. | ||
23 | pkg_use_module(LIBCONFIG libconfig ) | ||
24 | |||
25 | # For auto tests. | ||
26 | pkg_use_module(CHECK check ) | ||
27 | |||
28 | # For tox-spectest. | ||
29 | pkg_use_module(MSGPACK msgpack ) | ||
30 | |||
31 | # For av_test. | ||
32 | pkg_use_module(OPENCV opencv ) | ||
33 | pkg_use_module(PORTAUDIO portaudio-2.0) | ||
34 | pkg_use_module(SNDFILE sndfile ) | ||
35 | |||
36 | ############################################################################### | ||
37 | # | ||
38 | # :: For Windows and other systems lacking pkg-config. | ||
39 | # | ||
40 | ############################################################################### | ||
41 | |||
42 | if(NOT LIBSODIUM_FOUND) | ||
43 | include_directories(include) | ||
44 | find_library(LIBSODIUM_LIBRARIES | ||
45 | NAMES | ||
46 | sodium | ||
47 | libsodium | ||
48 | PATHS | ||
49 | Win32/Release/v140/static | ||
50 | x64/Release/v140/static | ||
51 | ) | ||
52 | if(LIBSODIUM_LIBRARIES) | ||
53 | set(LIBSODIUM_FOUND TRUE) | ||
54 | endif() | ||
55 | message("libsodium: ${LIBSODIUM_LIBRARIES}") | ||
56 | endif() | ||