make BUILD_TOXAV and option and fail if dependencies are missing

fixes #482
This commit is contained in:
Carsten Brandt 2017-02-20 23:33:50 +01:00
parent 63df16728c
commit a1f9df48d6
No known key found for this signature in database
GPG Key ID: BE4F41DE1DEEEED0
2 changed files with 10 additions and 5 deletions

View File

@ -170,12 +170,17 @@ if(ASAN)
set(CMAKE_REQUIRED_LIBRARIES "${SAFE_CMAKE_REQUIRED_LIBRARIES}") set(CMAKE_REQUIRED_LIBRARIES "${SAFE_CMAKE_REQUIRED_LIBRARIES}")
endif() endif()
option(BUILD_TOXAV "Whether to build the tox AV library" ON)
include(Dependencies) include(Dependencies)
if(OPUS_FOUND AND VPX_FOUND) if (BUILD_TOXAV)
set(BUILD_TOXAV TRUE) if(NOT OPUS_FOUND)
else() message(SEND_ERROR "Option BUILD_TOXAV is enabled but required library OPUS was not found.")
set(BUILD_TOXAV FALSE) endif()
if(NOT VPX_FOUND)
message(SEND_ERROR "Option BUILD_TOXAV is enabled but required library VPX was not found.")
endif()
endif() endif()
################################################################################ ################################################################################

View File

@ -13,7 +13,7 @@ install:
- cd .. - cd ..
before_build: before_build:
- cmake . -DBOOTSTRAP_DAEMON=OFF -DENABLE_SHARED=OFF - cmake . -DBOOTSTRAP_DAEMON=OFF -DENABLE_SHARED=OFF -DBUILD_TOXAV=OFF
build: build:
project: INSTALL.vcxproj project: INSTALL.vcxproj