From 2115ce66064acc6a45ecae5184156fbf064bfafc Mon Sep 17 00:00:00 2001 From: Dmitry Marakasov Date: Thu, 4 Feb 2016 16:50:33 +0300 Subject: [PATCH] Do not try to use miniupnp if upnp support is disabled --- build/CMakeLists.txt | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/build/CMakeLists.txt b/build/CMakeLists.txt index 71ce57ad..09d678e6 100644 --- a/build/CMakeLists.txt +++ b/build/CMakeLists.txt @@ -247,11 +247,9 @@ if(NOT DEFINED OPENSSL_INCLUDE_DIR) message(SEND_ERROR "Could not find OpenSSL. Please download and install it first!") endif() -find_package ( MiniUPnPc ) -if (MINIUPNPC_FOUND) - include_directories( ${MINIUPNPC_INCLUDE_DIR} ) -else () - set(WITH_UPNP OFF) +if (WITH_UPNP) + find_package ( MiniUPnPc REQUIRED ) + include_directories( SYSTEM ${MINIUPNPC_INCLUDE_DIR} ) endif() find_package ( ZLIB )