summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoriphydf <iphydf@users.noreply.github.com>2016-08-10 19:39:59 +0100
committeriphydf <iphydf@users.noreply.github.com>2016-08-12 01:58:23 +0100
commit11de2c222f31f9df85bcee99c5552a21a2b4895c (patch)
treedebc0f29e1dba0344187dffa7079c5f4d78cf7f5
parentf7324f997be2c5115ed312f33dc26c1c935fab3e (diff)
Build tox-bootstrapd in the cmake build.
-rw-r--r--CMakeLists.txt39
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)
15find_package(Threads REQUIRED) 15find_package(Threads REQUIRED)
16 16
17find_library(UTIL_LIBRARIES util) 17find_library(UTIL_LIBRARIES util)
18find_library(RT_LIBRARIES rt)
18 19
19pkg_search_module(LIBSODIUM REQUIRED libsodium)
20pkg_search_module(CHECK REQUIRED check) 20pkg_search_module(CHECK REQUIRED check)
21pkg_search_module(LIBCONFIG REQUIRED libconfig)
22pkg_search_module(LIBSODIUM REQUIRED libsodium)
21pkg_search_module(OPUS REQUIRED opus) 23pkg_search_module(OPUS REQUIRED opus)
22pkg_search_module(VPX REQUIRED vpx) 24pkg_search_module(VPX REQUIRED vpx)
23 25
24link_directories(${LIBSODIUM_LIBRARY_DIRS})
25link_directories(${CHECK_LIBRARY_DIRS}) 26link_directories(${CHECK_LIBRARY_DIRS})
27link_directories(${LIBCONFIG_LIBRARY_DIRS})
28link_directories(${LIBSODIUM_LIBRARY_DIRS})
26link_directories(${OPUS_LIBRARY_DIRS}) 29link_directories(${OPUS_LIBRARY_DIRS})
27link_directories(${VPX_LIBRARY_DIRS}) 30link_directories(${VPX_LIBRARY_DIRS})
28 31
29include_directories(${LIBSODIUM_INCLUDE_DIRS})
30include_directories(${CHECK_INCLUDE_DIRS}) 32include_directories(${CHECK_INCLUDE_DIRS})
33include_directories(${LIBCONFIG_INCLUDE_DIRS})
34include_directories(${LIBSODIUM_INCLUDE_DIRS})
31include_directories(${OPUS_INCLUDE_DIRS}) 35include_directories(${OPUS_INCLUDE_DIRS})
32include_directories(${VPX_INCLUDE_DIRS}) 36include_directories(${VPX_INCLUDE_DIRS})
33 37
34set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${LIBSODIUM_CFLAGS_OTHER}")
35set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CHECK_CFLAGS_OTHER}") 38set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CHECK_CFLAGS_OTHER}")
39set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${LIBCONFIG_CFLAGS_OTHER}")
40set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${LIBSODIUM_CFLAGS_OTHER}")
36set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OPUS_CFLAGS_OTHER}") 41set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OPUS_CFLAGS_OTHER}")
37set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${VPX_CFLAGS_OTHER}") 42set(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
70target_link_libraries(toxcore ${LIBSODIUM_LIBRARIES}) 75target_link_libraries(toxcore ${LIBSODIUM_LIBRARIES})
71target_link_libraries(toxcore rt) 76if(RT_LIBRARIES)
77 target_link_libraries(toxcore ${RT_LIBRARIES})
78endif()
72 79
73add_library(toxav SHARED 80add_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
146add_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
159target_link_libraries(tox-bootstrapd toxcore ${LIBCONFIG_LIBRARIES})
160
161
162################################################################################
163#
135# :: Test programs. 164# :: Test programs.
136# 165#
137################################################################################ 166################################################################################