diff options
author | Maxim Biro <nurupo.contributions@gmail.com> | 2017-04-16 05:57:21 -0400 |
---|---|---|
committer | Maxim Biro <nurupo.contributions@gmail.com> | 2017-04-22 15:31:25 -0400 |
commit | c7f63737ebfff2d1948ec9d6d92295a75d75cae5 (patch) | |
tree | ffaa46d8aecb53041ed61f6be73a4743fae6d4b1 /cmake | |
parent | 5ed37e543825c023163adba95b99ea81d3337196 (diff) |
Revert "Implement tox_loop"
This reverts commit 5ff099763b1f56414572e1c12eb2f003117db5a0.
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/Dependencies.cmake | 32 | ||||
-rw-r--r-- | cmake/ModulePackage.cmake | 27 |
2 files changed, 12 insertions, 47 deletions
diff --git a/cmake/Dependencies.cmake b/cmake/Dependencies.cmake index 4cb96594..5ad332bd 100644 --- a/cmake/Dependencies.cmake +++ b/cmake/Dependencies.cmake | |||
@@ -8,38 +8,30 @@ include(ModulePackage) | |||
8 | 8 | ||
9 | find_package(Threads REQUIRED) | 9 | find_package(Threads REQUIRED) |
10 | 10 | ||
11 | find_library(NCURSES_LIBRARIES ncurses ) | 11 | find_library(NCURSES_LIBRARIES ncurses ) |
12 | find_library(UTIL_LIBRARIES util ) | 12 | find_library(UTIL_LIBRARIES util ) |
13 | find_library(RT_LIBRARIES rt ) | 13 | find_library(RT_LIBRARIES rt ) |
14 | 14 | ||
15 | # For toxcore. | 15 | # For toxcore. |
16 | pkg_use_module(LIBSODIUM libsodium ) | 16 | pkg_use_module(LIBSODIUM libsodium ) |
17 | pkg_use_module(LIBEV ev ) | ||
18 | if(NOT LIBEV_FOUND) | ||
19 | if(NOT WIN32) | ||
20 | pkg_use_module(LIBEVENT libevent_pthreads ) | ||
21 | else() | ||
22 | pkg_use_module(LIBEVENT libevent ) | ||
23 | endif() | ||
24 | endif() | ||
25 | 17 | ||
26 | # For toxav. | 18 | # For toxav. |
27 | pkg_use_module(OPUS opus ) | 19 | pkg_use_module(OPUS opus ) |
28 | pkg_use_module(VPX vpx ) | 20 | pkg_use_module(VPX vpx ) |
29 | 21 | ||
30 | # For tox-bootstrapd. | 22 | # For tox-bootstrapd. |
31 | pkg_use_module(LIBCONFIG libconfig ) | 23 | pkg_use_module(LIBCONFIG libconfig ) |
32 | 24 | ||
33 | # For auto tests. | 25 | # For auto tests. |
34 | pkg_use_module(CHECK check ) | 26 | pkg_use_module(CHECK check ) |
35 | 27 | ||
36 | # For tox-spectest. | 28 | # For tox-spectest. |
37 | pkg_use_module(MSGPACK msgpack ) | 29 | pkg_use_module(MSGPACK msgpack ) |
38 | 30 | ||
39 | # For av_test. | 31 | # For av_test. |
40 | pkg_use_module(OPENCV opencv ) | 32 | pkg_use_module(OPENCV opencv ) |
41 | pkg_use_module(PORTAUDIO portaudio-2.0 ) | 33 | pkg_use_module(PORTAUDIO portaudio-2.0) |
42 | pkg_use_module(SNDFILE sndfile ) | 34 | pkg_use_module(SNDFILE sndfile ) |
43 | 35 | ||
44 | ############################################################################### | 36 | ############################################################################### |
45 | # | 37 | # |
diff --git a/cmake/ModulePackage.cmake b/cmake/ModulePackage.cmake index 4d22ee41..3a4eb9b9 100644 --- a/cmake/ModulePackage.cmake +++ b/cmake/ModulePackage.cmake | |||
@@ -2,8 +2,6 @@ option(ENABLE_SHARED "Build shared (dynamic) libraries for all modules" ON) | |||
2 | option(ENABLE_STATIC "Build static libraries for all modules" ON) | 2 | option(ENABLE_STATIC "Build static libraries for all modules" ON) |
3 | option(COMPILE_AS_CXX "Compile all C code as C++ code" OFF) | 3 | option(COMPILE_AS_CXX "Compile all C code as C++ code" OFF) |
4 | 4 | ||
5 | include(FindPackageHandleStandardArgs) | ||
6 | |||
7 | if(NOT ENABLE_SHARED AND NOT ENABLE_STATIC) | 5 | if(NOT ENABLE_SHARED AND NOT ENABLE_STATIC) |
8 | message(WARNING | 6 | message(WARNING |
9 | "Both static and shared libraries are disabled; " | 7 | "Both static and shared libraries are disabled; " |
@@ -50,31 +48,6 @@ function(pkg_use_module mod pkg) | |||
50 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -isystem ${dir}" PARENT_SCOPE) | 48 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -isystem ${dir}" PARENT_SCOPE) |
51 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -isystem ${dir}" PARENT_SCOPE) | 49 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -isystem ${dir}" PARENT_SCOPE) |
52 | endforeach() | 50 | endforeach() |
53 | else() | ||
54 | set(${mod}_DEFINITIONS ${${mod}_CFLAGS_OTHER}) | ||
55 | find_path(${mod}_INCLUDE_DIR NAMES ${ARGV1}.h | ||
56 | HINTS ${${mod}_INCLUDEDIR} ${${mod}_INCLUDE_DIRS} | ||
57 | PATH_SUFFIXES ${ARGV1}) | ||
58 | find_library(${mod}_LIBRARY NAMES ${ARGV1} lib${ARGV1} | ||
59 | HINTS ${${mod}_LIBDIR} ${${mod}_LIBRARY_DIRS}) | ||
60 | find_package_handle_standard_args(${mod} DEFAULT_MSG | ||
61 | ${mod}_LIBRARY ${mod}_INCLUDE_DIR) | ||
62 | |||
63 | if(${mod}_FOUND) | ||
64 | mark_as_advanced(${mod}_INCLUDE_DIR ${mod}_LIBRARY) | ||
65 | set(${mod}_LIBRARIES ${${mod}_LIBRARY} PARENT_SCOPE) | ||
66 | set(${mod}_INCLUDE_DIRS ${${mod}_INCLUDE_DIR} PARENT_SCOPE) | ||
67 | set(${mod}_FOUND TRUE PARENT_SCOPE) | ||
68 | link_directories(${${mod}_LIBRARY_DIRS}) | ||
69 | include_directories(${${mod}_INCLUDE_DIRS}) | ||
70 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${${mod}_CFLAGS_OTHER}" PARENT_SCOPE) | ||
71 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${${mod}_CFLAGS_OTHER}" PARENT_SCOPE) | ||
72 | |||
73 | foreach(dir ${${mod}_INCLUDE_DIRS}) | ||
74 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -isystem ${dir}" PARENT_SCOPE) | ||
75 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -isystem ${dir}" PARENT_SCOPE) | ||
76 | endforeach() | ||
77 | endif() | ||
78 | endif() | 51 | endif() |
79 | endfunction() | 52 | endfunction() |
80 | 53 | ||