From 837d5f413216f4136a86d6dadf4efba56a07c078 Mon Sep 17 00:00:00 2001
From: DarkmatterVale <valetolpegin@gmail.com>
Date: Sat, 13 Dec 2014 19:53:47 +0000
Subject: Fix Haiku build
 
NFD_OpenDialog
 
Haiku needs libbsd to use posix_openpty
 
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a54b37b..e81df43 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -369,6 +369,8 @@ MACRO(ADD_GEMRB_PLUGIN plugin_name)
                        TARGET_LINK_LIBRARIES(${plugin_name} -shared-libgcc)
                elseif (CMAKE_SYSTEM_NAME STREQUAL "OpenBSD")
                        TARGET_LINK_LIBRARIES(${plugin_name} -lc)
+               elseif (CMAKE_SYSTEM_NAME STREQUAL "Haiku")
+                       TARGET_LINK_LIBRARIES(${plugin_name} -lbsd)
                endif (CMAKE_SYSTEM_NAME STREQUAL "NetBSD")
                INSTALL(TARGETS ${plugin_name} DESTINATION ${PLUGIN_DIR})
        endif (STATIC_LINK)
--
1.8.3.4