Skip to content

Commit 2115ce6

Browse files
committed
Do not try to use miniupnp if upnp support is disabled
1 parent 51f7aba commit 2115ce6

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

build/CMakeLists.txt

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -247,11 +247,9 @@ if(NOT DEFINED OPENSSL_INCLUDE_DIR)
247247
message(SEND_ERROR "Could not find OpenSSL. Please download and install it first!")
248248
endif()
249249

250-
find_package ( MiniUPnPc )
251-
if (MINIUPNPC_FOUND)
252-
include_directories( ${MINIUPNPC_INCLUDE_DIR} )
253-
else ()
254-
set(WITH_UPNP OFF)
250+
if (WITH_UPNP)
251+
find_package ( MiniUPnPc REQUIRED )
252+
include_directories( SYSTEM ${MINIUPNPC_INCLUDE_DIR} )
255253
endif()
256254

257255
find_package ( ZLIB )

0 commit comments

Comments
 (0)