summaryrefslogtreecommitdiff
path: root/cmake/Dependencies.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/Dependencies.cmake')
-rw-r--r--cmake/Dependencies.cmake56
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
7include(ModulePackage)
8
9find_package(Threads REQUIRED)
10
11find_library(NCURSES_LIBRARIES ncurses )
12find_library(UTIL_LIBRARIES util )
13find_library(RT_LIBRARIES rt )
14
15# For toxcore.
16pkg_use_module(LIBSODIUM libsodium )
17
18# For toxav.
19pkg_use_module(OPUS opus )
20pkg_use_module(VPX vpx )
21
22# For tox-bootstrapd.
23pkg_use_module(LIBCONFIG libconfig )
24
25# For auto tests.
26pkg_use_module(CHECK check )
27
28# For tox-spectest.
29pkg_use_module(MSGPACK msgpack )
30
31# For av_test.
32pkg_use_module(OPENCV opencv )
33pkg_use_module(PORTAUDIO portaudio-2.0)
34pkg_use_module(SNDFILE sndfile )
35
36###############################################################################
37#
38# :: For Windows and other systems lacking pkg-config.
39#
40###############################################################################
41
42if(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}")
56endif()