Add an option that allows us to specify that we require toxav.

This commit is contained in:
iphydf 2018-02-22 13:56:11 +00:00
parent 414b8f7425
commit d7471482d1
No known key found for this signature in database
GPG Key ID: 3855DBA2D74403C9
2 changed files with 10 additions and 2 deletions

View File

@ -188,16 +188,23 @@ if(NOT USE_IPV6)
endif()
option(BUILD_TOXAV "Whether to build the tox AV library" ON)
option(MUST_BUILD_TOXAV "Fail the build if toxav cannot be built" OFF)
include(Dependencies)
if(MUST_BUILD_TOXAV)
set(NO_TOXAV_ERROR_TYPE SEND_ERROR)
else()
set(NO_TOXAV_ERROR_TYPE WARNING)
endif()
if(BUILD_TOXAV)
if(NOT OPUS_FOUND)
message(WARNING "Option BUILD_TOXAV is enabled but required library OPUS was not found.")
message(${NO_TOXAV_ERROR_TYPE} "Option BUILD_TOXAV is enabled but required library OPUS was not found.")
set(BUILD_TOXAV OFF)
endif()
if(NOT VPX_FOUND)
message(WARNING "Option BUILD_TOXAV is enabled but required library VPX was not found.")
message(${NO_TOXAV_ERROR_TYPE} "Option BUILD_TOXAV is enabled but required library VPX was not found.")
set(BUILD_TOXAV OFF)
endif()
endif()

View File

@ -30,6 +30,7 @@ RUN $CMAKE \
-DCMAKE_INSTALL_PREFIX:PATH=$CURDIR/_install \
-DASAN=ON \
-DDEBUG=ON \
-DMUST_BUILD_TOXAV=ON \
-DSTRICT_ABI=ON \
-DTEST_TIMEOUT_SECONDS=120 \
-DTRACE=ON \