From ea71c41d9f28a315a23e14ace8c8050d14f6b47f Mon Sep 17 00:00:00 2001
From: Sergei Reznikov <diver@gelios.net>
Date: Mon, 14 Dec 2020 23:31:02 +0300
Subject: Link against libnetwork on Haiku


diff --git a/src/kdeinit/CMakeLists.txt b/src/kdeinit/CMakeLists.txt
index a2b2496..936ef7c 100644
--- a/src/kdeinit/CMakeLists.txt
+++ b/src/kdeinit/CMakeLists.txt
@@ -54,6 +54,10 @@ if (NOT WIN32)
   add_executable(kdeinit5_shutdown ../wrapper.cpp)
   ecm_mark_nongui_executable(kdeinit5_shutdown)
 
+  if (HAIKU)
+    target_link_libraries(kdeinit5_shutdown network)
+  endif ()
+
   target_link_libraries(kdeinit5_shutdown  ${KINIT_SOCKET_LIBRARY} Qt5::Core KF5::DBusAddons)
 
   install(TARGETS kdeinit5_shutdown ${KF5_INSTALL_TARGETS_DEFAULT_ARGS} )
@@ -62,6 +66,10 @@ if (NOT WIN32)
   add_executable(kdeinit5_wrapper ../wrapper.cpp)
   ecm_mark_nongui_executable(kdeinit5_wrapper)
 
+  if (HAIKU)
+    target_link_libraries(kdeinit5_wrapper network)
+  endif ()
+
   target_link_libraries(kdeinit5_wrapper  ${KINIT_SOCKET_LIBRARY} Qt5::Core KF5::DBusAddons)
 
   if (NOT X11_FOUND)
diff --git a/src/klauncher/CMakeLists.txt b/src/klauncher/CMakeLists.txt
index 12cc728..fdb8dc3 100644
--- a/src/klauncher/CMakeLists.txt
+++ b/src/klauncher/CMakeLists.txt
@@ -36,6 +36,10 @@ if (APPLE)
     target_link_libraries(kdeinit_klauncher "-framework CoreFoundation")
 endif()
 
+if (HAIKU)
+    target_link_libraries(kdeinit_klauncher network)
+endif ()
+
 if (HAVE_XCB)
     target_link_libraries(kdeinit_klauncher XCB::XCB)
 endif()
diff --git a/src/kshell/CMakeLists.txt b/src/kshell/CMakeLists.txt
index 08dab96..cbf5eb3 100644
--- a/src/kshell/CMakeLists.txt
+++ b/src/kshell/CMakeLists.txt
@@ -7,4 +7,8 @@ if (NOT WIN32)
     target_link_libraries(kshell5 KF5::DBusAddons)
 endif()
 
+if (HAIKU)
+    target_link_libraries(kshell5 network)
+endif ()
+
 install(TARGETS kshell5 ${KF5_INSTALL_TARGETS_DEFAULT_ARGS} )
diff --git a/src/kwrapper/CMakeLists.txt b/src/kwrapper/CMakeLists.txt
index 6649917..f500642 100644
--- a/src/kwrapper/CMakeLists.txt
+++ b/src/kwrapper/CMakeLists.txt
@@ -13,4 +13,8 @@ if (NOT WIN32)
     target_link_libraries(kwrapper5 KF5::DBusAddons)
 endif()
 
+if (HAIKU)
+    target_link_libraries(kwrapper5 network)
+endif ()
+
 install(TARGETS kwrapper5 ${KF5_INSTALL_TARGETS_DEFAULT_ARGS} )
-- 
2.28.0

