diff options
author | iphydf <iphydf@users.noreply.github.com> | 2016-08-10 19:39:59 +0100 |
---|---|---|
committer | iphydf <iphydf@users.noreply.github.com> | 2016-08-12 01:58:23 +0100 |
commit | 11de2c222f31f9df85bcee99c5552a21a2b4895c (patch) | |
tree | debc0f29e1dba0344187dffa7079c5f4d78cf7f5 | |
parent | f7324f997be2c5115ed312f33dc26c1c935fab3e (diff) |
Build tox-bootstrapd in the cmake build.
-rw-r--r-- | CMakeLists.txt | 39 |
1 files changed, 34 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 5e6974ce..3d4a693c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt | |||
@@ -15,24 +15,29 @@ find_package(PkgConfig REQUIRED) | |||
15 | find_package(Threads REQUIRED) | 15 | find_package(Threads REQUIRED) |
16 | 16 | ||
17 | find_library(UTIL_LIBRARIES util) | 17 | find_library(UTIL_LIBRARIES util) |
18 | find_library(RT_LIBRARIES rt) | ||
18 | 19 | ||
19 | pkg_search_module(LIBSODIUM REQUIRED libsodium) | ||
20 | pkg_search_module(CHECK REQUIRED check) | 20 | pkg_search_module(CHECK REQUIRED check) |
21 | pkg_search_module(LIBCONFIG REQUIRED libconfig) | ||
22 | pkg_search_module(LIBSODIUM REQUIRED libsodium) | ||
21 | pkg_search_module(OPUS REQUIRED opus) | 23 | pkg_search_module(OPUS REQUIRED opus) |
22 | pkg_search_module(VPX REQUIRED vpx) | 24 | pkg_search_module(VPX REQUIRED vpx) |
23 | 25 | ||
24 | link_directories(${LIBSODIUM_LIBRARY_DIRS}) | ||
25 | link_directories(${CHECK_LIBRARY_DIRS}) | 26 | link_directories(${CHECK_LIBRARY_DIRS}) |
27 | link_directories(${LIBCONFIG_LIBRARY_DIRS}) | ||
28 | link_directories(${LIBSODIUM_LIBRARY_DIRS}) | ||
26 | link_directories(${OPUS_LIBRARY_DIRS}) | 29 | link_directories(${OPUS_LIBRARY_DIRS}) |
27 | link_directories(${VPX_LIBRARY_DIRS}) | 30 | link_directories(${VPX_LIBRARY_DIRS}) |
28 | 31 | ||
29 | include_directories(${LIBSODIUM_INCLUDE_DIRS}) | ||
30 | include_directories(${CHECK_INCLUDE_DIRS}) | 32 | include_directories(${CHECK_INCLUDE_DIRS}) |
33 | include_directories(${LIBCONFIG_INCLUDE_DIRS}) | ||
34 | include_directories(${LIBSODIUM_INCLUDE_DIRS}) | ||
31 | include_directories(${OPUS_INCLUDE_DIRS}) | 35 | include_directories(${OPUS_INCLUDE_DIRS}) |
32 | include_directories(${VPX_INCLUDE_DIRS}) | 36 | include_directories(${VPX_INCLUDE_DIRS}) |
33 | 37 | ||
34 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${LIBSODIUM_CFLAGS_OTHER}") | ||
35 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CHECK_CFLAGS_OTHER}") | 38 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CHECK_CFLAGS_OTHER}") |
39 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${LIBCONFIG_CFLAGS_OTHER}") | ||
40 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${LIBSODIUM_CFLAGS_OTHER}") | ||
36 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OPUS_CFLAGS_OTHER}") | 41 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OPUS_CFLAGS_OTHER}") |
37 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${VPX_CFLAGS_OTHER}") | 42 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${VPX_CFLAGS_OTHER}") |
38 | 43 | ||
@@ -68,7 +73,9 @@ add_library(toxcore SHARED | |||
68 | toxcore/util.c) | 73 | toxcore/util.c) |
69 | 74 | ||
70 | target_link_libraries(toxcore ${LIBSODIUM_LIBRARIES}) | 75 | target_link_libraries(toxcore ${LIBSODIUM_LIBRARIES}) |
71 | target_link_libraries(toxcore rt) | 76 | if(RT_LIBRARIES) |
77 | target_link_libraries(toxcore ${RT_LIBRARIES}) | ||
78 | endif() | ||
72 | 79 | ||
73 | add_library(toxav SHARED | 80 | add_library(toxav SHARED |
74 | toxav/audio.c | 81 | toxav/audio.c |
@@ -132,6 +139,28 @@ auto_test(toxav_many_test) | |||
132 | 139 | ||
133 | ################################################################################ | 140 | ################################################################################ |
134 | # | 141 | # |
142 | # :: Bootstrap daemon. | ||
143 | # | ||
144 | ################################################################################ | ||
145 | |||
146 | add_executable(tox-bootstrapd | ||
147 | other/bootstrap_daemon/src/command_line_arguments.c | ||
148 | other/bootstrap_daemon/src/command_line_arguments.h | ||
149 | other/bootstrap_daemon/src/config.c | ||
150 | other/bootstrap_daemon/src/config_defaults.h | ||
151 | other/bootstrap_daemon/src/config.h | ||
152 | other/bootstrap_daemon/src/log.c | ||
153 | other/bootstrap_daemon/src/log.h | ||
154 | other/bootstrap_daemon/src/tox-bootstrapd.c | ||
155 | other/bootstrap_daemon/src/global.h | ||
156 | other/bootstrap_node_packets.c | ||
157 | other/bootstrap_node_packets.h) | ||
158 | |||
159 | target_link_libraries(tox-bootstrapd toxcore ${LIBCONFIG_LIBRARIES}) | ||
160 | |||
161 | |||
162 | ################################################################################ | ||
163 | # | ||
135 | # :: Test programs. | 164 | # :: Test programs. |
136 | # | 165 | # |
137 | ################################################################################ | 166 | ################################################################################ |