From 5e5f22e7abb29fc30749f3f991c3d6f9579f2a81 Mon Sep 17 00:00:00 2001 From: SoftCoder Date: Wed, 8 Jan 2014 16:31:30 -0800 Subject: [PATCH] - fix cmake checking for libminiupnpc versions to not actually call api's just compile check --- mk/cmake/Modules/FindMiniupnpc.cmake | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/mk/cmake/Modules/FindMiniupnpc.cmake b/mk/cmake/Modules/FindMiniupnpc.cmake index adcc2a11..406c001d 100644 --- a/mk/cmake/Modules/FindMiniupnpc.cmake +++ b/mk/cmake/Modules/FindMiniupnpc.cmake @@ -82,8 +82,8 @@ if (MINIUPNP_FOUND) { static struct UPNPUrls urls; static struct IGDdatas data; - - GetUPNPUrls (&urls, &data, \"myurl\",0); + int compileTest = 1; + if(compileTest == 0) GetUPNPUrls (&urls, &data, \"myurl\",0); return 0; }" @@ -100,13 +100,14 @@ if (MINIUPNP_FOUND) int main() { struct UPNPDev *devlist = NULL; - int upnp_delay = 5000; + int upnp_delay = 1; const char *upnp_multicastif = NULL; const char *upnp_minissdpdsock = NULL; int upnp_sameport = 0; int upnp_ipv6 = 0; int upnp_error = 0; - devlist = upnpDiscover(upnp_delay, upnp_multicastif, upnp_minissdpdsock, upnp_sameport, upnp_ipv6, &upnp_error); + int compileTest = 1; + if(compileTest == 0) devlist = upnpDiscover(upnp_delay, upnp_multicastif, upnp_minissdpdsock, upnp_sameport, upnp_ipv6, &upnp_error); return 0; }" @@ -124,13 +125,14 @@ if (MINIUPNP_FOUND) int main() { struct UPNPDev *devlist = NULL; - int upnp_delay = 5000; + int upnp_delay = 1; const char *upnp_multicastif = NULL; const char *upnp_minissdpdsock = NULL; int upnp_sameport = 0; int upnp_ipv6 = 0; int upnp_error = 0; - devlist = upnpDiscover(upnp_delay, upnp_multicastif, upnp_minissdpdsock, upnp_sameport); + int compileTest = 1; + if(compileTest == 0) devlist = upnpDiscover(upnp_delay, upnp_multicastif, upnp_minissdpdsock, upnp_sameport); return 0; }" @@ -151,7 +153,8 @@ if (MINIUPNP_FOUND) int main() { char externalIP[16] = \"\"; - UPNP_GetExternalIPAddress(urls.controlURL, data.first.servicetype, externalIP); + int compileTest = 1; + if(compileTest == 0) UPNP_GetExternalIPAddress(urls.controlURL, data.first.servicetype, externalIP); return 0; }" @@ -171,7 +174,8 @@ if (MINIUPNP_FOUND) int main() { char externalIP[16] = \"\"; - UPNP_GetExternalIPAddress(urls.controlURL, data.servicetype, externalIP); + int compileTest = 1; + if(compileTest == 0) UPNP_GetExternalIPAddress(urls.controlURL, data.servicetype, externalIP); return 0; }"