aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorfluffypony <ric@spagni.net>2014-09-09 14:03:42 +0200
committerfluffypony <ric@spagni.net>2014-09-09 14:03:42 +0200
commit5a6599148018aa6b3557834acd47465064ad3bfc (patch)
treedc13b2826c6f5cb4b8d9ce1abdb6986c39fd1e11 /CMakeLists.txt
parentFreeBSD alloca.h reference fixed (diff)
downloadmonero-5a6599148018aa6b3557834acd47465064ad3bfc.tar.xz
exclude local miniupnpc for FreeBSD, install from ports instead
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt17
1 files changed, 17 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c5a7220e9..9614d7028 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -7,6 +7,23 @@ set_property(GLOBAL PROPERTY USE_FOLDERS ON)
set(CMAKE_CONFIGURATION_TYPES "Debug;Release")
enable_testing()
+# Check if we're on FreeBSD so we can exclude the local miniupnpc (it should be installed from ports instead)
+# CMAKE_SYSTEM_NAME checks are commonly known, but specifically taken from libsdl's CMakeLists
+if(CMAKE_SYSTEM_NAME MATCHES "kFreeBSD.*")
+ set(FREEBSD TRUE)
+elseif(CMAKE_SYSTEM_NAME MATCHES "DragonFly.*|FreeBSD")
+ set(FREEBSD TRUE)
+endif()
+
+# TODO: check bsdi, NetBSD, OpenBSD, to see if they need the same FreeBSD changes
+#
+# elseif(CMAKE_SYSTEM_NAME MATCHES "kNetBSD.*|NetBSD.*")
+# set(NETBSD TRUE)
+# elseif(CMAKE_SYSTEM_NAME MATCHES "kOpenBSD.*|OpenBSD.*")
+# set(OPENBSD TRUE)
+# elseif(CMAKE_SYSTEM_NAME MATCHES ".*BSDI.*")
+# set(BSDI TRUE)
+
function(set_static_flags)
if (NOT APPLE)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libgcc -static-libstdc++")