CMake: simplify FindMiniupnpc.cmake

miniupnpc.h provides MINIUPNPC_API_VERSION since 1.7 and we require 1.7
or later, so there is no reason to have version detection code for older
versions.
This commit is contained in:
Tillmann Karras
2015-10-12 02:26:35 +02:00
parent c8382cca83
commit 4eace2b49e
3 changed files with 19 additions and 212 deletions

View File

@ -904,7 +904,7 @@ bool NetPlayServer::initUPnP()
memset(&m_upnp_data, 0, sizeof(IGDdatas));
// Find all UPnP devices
#ifdef UPNPDISCOVER_HAS_TTL
#if MINIUPNPC_API_VERSION >= 14
UPNPDev *devlist = upnpDiscover(2000, nullptr, nullptr, 0, 0, 2, &upnperror);
#else
UPNPDev *devlist = upnpDiscover(2000, nullptr, nullptr, 0, 0, &upnperror);