Do not try to use miniupnp if upnp support is disabled

This commit is contained in:
Dmitry Marakasov 2016-02-04 16:50:33 +03:00
parent 51f7aba807
commit 2115ce6606

View File

@ -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 )