summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt11
1 files changed, 9 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)
188endif() 188endif()
189 189
190option(BUILD_TOXAV "Whether to build the tox AV library" ON) 190option(BUILD_TOXAV "Whether to build the tox AV library" ON)
191option(MUST_BUILD_TOXAV "Fail the build if toxav cannot be built" OFF)
191 192
192include(Dependencies) 193include(Dependencies)
193 194
195if(MUST_BUILD_TOXAV)
196 set(NO_TOXAV_ERROR_TYPE SEND_ERROR)
197else()
198 set(NO_TOXAV_ERROR_TYPE WARNING)
199endif()
200
194if(BUILD_TOXAV) 201if(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()
203endif() 210endif()