summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorDouglas R. Reno <renodr@linuxfromscratch.org>2023-03-19 02:07:51 -0500
committerDaniel Stenberg <daniel@haxx.se>2023-03-22 14:03:22 +0100
commit0c943964e1189116e6f392e5e809e24ccdbb2637 (patch)
tree4f4c80a869f4cc453cf01df90efc568daa7268d3 /CMakeLists.txt
parent70afa0d2516caf5373aaa021826537444f9502c4 (diff)
downloadcurl-0c943964e1189116e6f392e5e809e24ccdbb2637.tar.gz
cmake: bring in the network library on Haiku.
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
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ed60f07bc..874cc4eea 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -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)