Honor DISABLE_CONAN environment variable (#1080)

This commit is contained in:
Victor Villar 2021-01-12 17:08:38 +01:00 committed by GitHub
parent 5335ce9e4e
commit b96cd88a30
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 5 deletions

View File

@ -47,12 +47,9 @@ option(BUILD_TESTS "Specify whether we want to build tests or not" FALSE)
# Allow disabling conan for downstream package managers. Requires all libraries to be present in path
# Default is value of environment variable if defined or ON
if(DEFINED ENV{DISABLE_CONAN})
set(_DISABLE_CONAN_DEFAULT ENV{DISABLE_CONAN})
else()
set(_DISABLE_CONAN_DEFAULT OFF)
if(NOT DEFINED DISABLE_CONAN AND DEFINED ENV{DISABLE_CONAN})
set(DISABLE_CONAN $ENV{DISABLE_CONAN})
endif()
option(DISABLE_CONAN "Disable Conan package manager to find dependencies. If disabled, you must have all dependencies present on your system." ${_DISABLE_CONAN_DEFAULT})
include(CTest)
include(compiler_utils)