diff options
author | iphydf <iphydf@users.noreply.github.com> | 2018-02-22 13:56:11 +0000 |
---|---|---|
committer | iphydf <iphydf@users.noreply.github.com> | 2018-02-22 13:56:55 +0000 |
commit | d7471482d133c00c61016335c8518b02c6ac9bc7 (patch) | |
tree | 39ff8396d5da545da426e9c8af1119a13c64ab39 | |
parent | 414b8f7425aeb22b02a1649830cf96e7ac1163b0 (diff) |
Add an option that allows us to specify that we require toxav.
-rw-r--r-- | CMakeLists.txt | 11 | ||||
-rwxr-xr-x | other/travis/toxcore-script | 1 |
2 files changed, 10 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 3262471b..cea97fce 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt | |||
@@ -188,16 +188,23 @@ if(NOT USE_IPV6) | |||
188 | endif() | 188 | endif() |
189 | 189 | ||
190 | option(BUILD_TOXAV "Whether to build the tox AV library" ON) | 190 | option(BUILD_TOXAV "Whether to build the tox AV library" ON) |
191 | option(MUST_BUILD_TOXAV "Fail the build if toxav cannot be built" OFF) | ||
191 | 192 | ||
192 | include(Dependencies) | 193 | include(Dependencies) |
193 | 194 | ||
195 | if(MUST_BUILD_TOXAV) | ||
196 | set(NO_TOXAV_ERROR_TYPE SEND_ERROR) | ||
197 | else() | ||
198 | set(NO_TOXAV_ERROR_TYPE WARNING) | ||
199 | endif() | ||
200 | |||
194 | if(BUILD_TOXAV) | 201 | if(BUILD_TOXAV) |
195 | if(NOT OPUS_FOUND) | 202 | if(NOT OPUS_FOUND) |
196 | message(WARNING "Option BUILD_TOXAV is enabled but required library OPUS was not found.") | 203 | message(${NO_TOXAV_ERROR_TYPE} "Option BUILD_TOXAV is enabled but required library OPUS was not found.") |
197 | set(BUILD_TOXAV OFF) | 204 | set(BUILD_TOXAV OFF) |
198 | endif() | 205 | endif() |
199 | if(NOT VPX_FOUND) | 206 | if(NOT VPX_FOUND) |
200 | message(WARNING "Option BUILD_TOXAV is enabled but required library VPX was not found.") | 207 | message(${NO_TOXAV_ERROR_TYPE} "Option BUILD_TOXAV is enabled but required library VPX was not found.") |
201 | set(BUILD_TOXAV OFF) | 208 | set(BUILD_TOXAV OFF) |
202 | endif() | 209 | endif() |
203 | endif() | 210 | endif() |
diff --git a/other/travis/toxcore-script b/other/travis/toxcore-script index 65c4c7b5..83ca8c04 100755 --- a/other/travis/toxcore-script +++ b/other/travis/toxcore-script | |||
@@ -30,6 +30,7 @@ RUN $CMAKE \ | |||
30 | -DCMAKE_INSTALL_PREFIX:PATH=$CURDIR/_install \ | 30 | -DCMAKE_INSTALL_PREFIX:PATH=$CURDIR/_install \ |
31 | -DASAN=ON \ | 31 | -DASAN=ON \ |
32 | -DDEBUG=ON \ | 32 | -DDEBUG=ON \ |
33 | -DMUST_BUILD_TOXAV=ON \ | ||
33 | -DSTRICT_ABI=ON \ | 34 | -DSTRICT_ABI=ON \ |
34 | -DTEST_TIMEOUT_SECONDS=120 \ | 35 | -DTEST_TIMEOUT_SECONDS=120 \ |
35 | -DTRACE=ON \ | 36 | -DTRACE=ON \ |