mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
make BUILD_TOXAV and option and fail if dependencies are missing
fixes #482
This commit is contained in:
parent
63df16728c
commit
a1f9df48d6
|
@ -170,12 +170,17 @@ if(ASAN)
|
|||
set(CMAKE_REQUIRED_LIBRARIES "${SAFE_CMAKE_REQUIRED_LIBRARIES}")
|
||||
endif()
|
||||
|
||||
option(BUILD_TOXAV "Whether to build the tox AV library" ON)
|
||||
|
||||
include(Dependencies)
|
||||
|
||||
if(OPUS_FOUND AND VPX_FOUND)
|
||||
set(BUILD_TOXAV TRUE)
|
||||
else()
|
||||
set(BUILD_TOXAV FALSE)
|
||||
if (BUILD_TOXAV)
|
||||
if(NOT OPUS_FOUND)
|
||||
message(SEND_ERROR "Option BUILD_TOXAV is enabled but required library OPUS was not found.")
|
||||
endif()
|
||||
if(NOT VPX_FOUND)
|
||||
message(SEND_ERROR "Option BUILD_TOXAV is enabled but required library VPX was not found.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
################################################################################
|
||||
|
|
|
@ -13,7 +13,7 @@ install:
|
|||
- cd ..
|
||||
|
||||
before_build:
|
||||
- cmake . -DBOOTSTRAP_DAEMON=OFF -DENABLE_SHARED=OFF
|
||||
- cmake . -DBOOTSTRAP_DAEMON=OFF -DENABLE_SHARED=OFF -DBUILD_TOXAV=OFF
|
||||
|
||||
build:
|
||||
project: INSTALL.vcxproj
|
||||
|
|
Loading…
Reference in New Issue
Block a user