$OpenBSD: patch-CMakeLists_txt,v 1.1.1.1 2020/01/31 23:32:54 abieber Exp $

https://github.com/debauchee/barrier/pull/468

Index: CMakeLists.txt
--- CMakeLists.txt.orig
+++ CMakeLists.txt
@@ -167,6 +167,14 @@ if (UNIX)
             link_directories("/usr/local/lib")
         endif()
 
+	if (${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD")
+	    set (CMAKE_REQUIRED_INCLUDES "${CMAKE_REQUIRED_INCLUDES};${X11BASE}/include;${LOCALBASE}/include;${LOCALBASE}/include/avahi-compat-libdns_sd")
+	    set (CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -L${LOCALBASE}/lib -L${X11BASE}/lib")
+	    include_directories("${LOCALBASE}/include" "${X11BASE}/include" "${LOCALBASE}/include/avahi-compat-libdns_sd")
+            link_directories("${LOCALBASE}/lib")
+	    link_directories("${X11BASE}/lib")
+        endif()
+
         if (${PKG_CONFIG_FOUND})
             pkg_check_modules (AVAHI_COMPAT REQUIRED avahi-compat-libdns_sd)
             include_directories (BEFORE SYSTEM ${AVAHI_COMPAT_INCLUDE_DIRS})
