aboutsummaryrefslogtreecommitdiff
path: root/external/CMakeLists.txt
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2014-09-24 21:23:23 +0200
committerRiccardo Spagni <ric@spagni.net>2014-09-24 21:23:23 +0200
commitdda5a03146b3b709db1489edc5aa10d92d6a3fee (patch)
tree4cdcaf008cb2ec9f740d53bc76db4180a92a3564 /external/CMakeLists.txt
parentnever use the baked-in miniupnpc on FreeBSD because explosions (diff)
downloadmonero-dda5a03146b3b709db1489edc5aa10d92d6a3fee.tar.xz
fixed FreeBSD miniupnpc niggly
Diffstat (limited to '')
-rwxr-xr-xexternal/CMakeLists.txt15
1 files changed, 14 insertions, 1 deletions
diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt
index f75c420ed..f121162df 100755
--- a/external/CMakeLists.txt
+++ b/external/CMakeLists.txt
@@ -216,7 +216,20 @@ MARK_AS_ADVANCED(MINIUPNP_INCLUDE_DIR MINIUPNP_LIBRARY)
# And now on to the Monero part of things
-if(MINIUPNP_FOUND AND MINIUPNPC_VERSION_1_7_OR_HIGHER AND !STATIC AND !FREEBSD)
+# FreeBSD doesn't play well with the local copy
+SET(USE_SHARED false)
+
+# If we have the correct shared version and we're not building static, use it
+IF(MINIUPNP_FOUND AND MINIUPNPC_VERSION_1_7_OR_HIGHER AND !STATIC)
+ SET(USE_SHARED true)
+ENDIF()
+
+# If we're on FreeBSD
+IF(FREEBSD)
+ SET(USE_SHARED true)
+ENDIF()
+
+if(USE_SHARED)
message(STATUS "Using shared miniupnpc found at ${MINIUPNP_INCLUDE_DIR}")
set(UPNP_STATIC false PARENT_SCOPE)