]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
cmake: bring in the network library on Haiku.
authorDouglas R. Reno <renodr@linuxfromscratch.org>
Sun, 19 Mar 2023 07:07:51 +0000 (02:07 -0500)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 22 Mar 2023 13:03:22 +0000 (14:03 +0100)
When cross-compiling for Haiku, the networking library needs to be
brought in. Without this, an unknown type of "Error" is reported in
lib/curl_setup_once.h.

This is also needed when using CMake natively on Haiku to build libcurl.

Fixes #10296
Closes #10792

CMakeLists.txt

index ed60f07bcee31aff01ac8483a55d7ececadc46cf..874cc4eea3fc8d69f2c1c2c18042fa884cfb7871 100644 (file)
@@ -321,6 +321,11 @@ if(${CMAKE_SYSTEM_NAME} MATCHES AIX)
   set(_ALL_SOURCE 1)
 endif()
 
+# If we are on Haiku, make sure that the network library is brought in.
+if(${CMAKE_SYSTE_NAME} MATCHES Haiku)
+  set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -lnetwork")
+endif()
+
 # Include all the necessary files for macros
 include(CMakePushCheckState)
 include(CheckFunctionExists)