aboutsummaryrefslogtreecommitdiff
path: root/cmake/FindMiniupnpc.cmake
diff options
context:
space:
mode:
authorOrestis Konstantinidis <orestkon@gmail.com>2017-09-04 15:55:00 +0300
committerOrestis Konstantinidis <orestkon@gmail.com>2017-09-04 15:56:14 +0300
commitd0bbc5912aba6d0654ee8a405180ba0aac236f44 (patch)
tree22f7079c35924fe8084d530171c62bf776789069 /cmake/FindMiniupnpc.cmake
parentMerge pull request #2384 (diff)
downloadmonero-d0bbc5912aba6d0654ee8a405180ba0aac236f44.tar.xz
Only check for upnp version if version is determined
Diffstat (limited to 'cmake/FindMiniupnpc.cmake')
-rw-r--r--cmake/FindMiniupnpc.cmake10
1 files changed, 5 insertions, 5 deletions
diff --git a/cmake/FindMiniupnpc.cmake b/cmake/FindMiniupnpc.cmake
index 77675db48..ad2004afc 100644
--- a/cmake/FindMiniupnpc.cmake
+++ b/cmake/FindMiniupnpc.cmake
@@ -46,13 +46,13 @@ IF(MINIUPNPC_FOUND)
file(STRINGS "${MINIUPNP_INCLUDE_DIR}/miniupnpc.h" MINIUPNPC_API_VERSION_STR REGEX "^#define[\t ]+MINIUPNPC_API_VERSION[\t ]+[0-9]+")
if(MINIUPNPC_API_VERSION_STR MATCHES "^#define[\t ]+MINIUPNPC_API_VERSION[\t ]+([0-9]+)")
set(MINIUPNPC_API_VERSION "${CMAKE_MATCH_1}")
+ if (${MINIUPNPC_API_VERSION} GREATER "10" OR ${MINIUPNPC_API_VERSION} EQUAL "10")
+ message(STATUS "Found miniupnpc API version " ${MINIUPNPC_API_VERSION})
+ set(MINIUPNP_FOUND true)
+ set(MINIUPNPC_VERSION_1_7_OR_HIGHER true)
+ endif()
endif()
- if (${MINIUPNPC_API_VERSION} GREATER "10" OR ${MINIUPNPC_API_VERSION} EQUAL "10")
- message(STATUS "Found miniupnpc API version " ${MINIUPNPC_API_VERSION})
- set(MINIUPNP_FOUND true)
- set(MINIUPNPC_VERSION_1_7_OR_HIGHER true)
- endif()
ENDIF()
mark_as_advanced(MINIUPNP_INCLUDE_DIR MINIUPNP_LIBRARY MINIUPNP_STATIC_LIBRARY)