Description: Fix a FTBFS on kfreebsd
 on kfreebsd, the execinfo library cannot be found for an unkown
 reason, but this does not affect the ability to build (and hopefully,
 to run).
 .
 So simply ignore that error at config time.
Author: Martin Quinson <mquinson@debian.org>
Forwarded-Upstream: no, and cannot be
 This will probably break for users of freeBSD that are not using the
 libc, so applying it as is would be a bad idea

---
 src/CMakeLists.txt |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Index: b/src/CMakeLists.txt
===================================================================
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -118,7 +118,11 @@
   target_link_libraries(widelands_all ${MINIZIP_LIBRARY})
 endif (MINIZIP_FOUND)
 if (CMAKE_SYSTEM_NAME MATCHES "FreeBSD" OR CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
-  target_link_libraries(widelands_all ${EXECINFO_LIBRARY})
+  if (EXECINFO_LIBRARY MATCHES "NOTFOUND")
+    message(STATUS "Warning: cannot find the execinfo library. Let's proceed without it and hope for the best")
+  else(EXECINFO_LIBRARY MATCHES "NOTFOUND")
+    target_link_libraries(widelands_all ${EXECINFO_LIBRARY})
+  endif(EXECINFO_LIBRARY MATCHES "NOTFOUND")
 endif (CMAKE_SYSTEM_NAME MATCHES "FreeBSD" OR CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
 
 if (DEFINED WL_EXTRA_LINK_LIBRARIES)
