From f4ecb96e5441fedb6ecf8af67088abcc2122cacc Mon Sep 17 00:00:00 2001 From: Carter Green Date: Thu, 11 Dec 2025 19:12:31 -0600 Subject: [PATCH] Fix linker error on macOS (#2299) --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8a8ab0a..7566dcd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -269,14 +269,16 @@ target_include_directories(${PROJECT_NAME} SYSTEM ${_INTERFACE_OR_PUBLIC} $ ) -# Always require threads target_link_libraries(${PROJECT_NAME} ${_INTERFACE_OR_PUBLIC} + # Always require threads Threads::Threads # Needed for Windows libs on Mingw, as the pragma comment(lib, "xyz") aren't triggered. $<$:ws2_32> $<$:crypt32> # Needed for API from MacOS Security framework "$<$,$,$>:-framework CoreFoundation -framework Security>" + # Needed for non-blocking getaddrinfo on MacOS + "$<$,$>:-framework CFNetwork>" # Can't put multiple targets in a single generator expression or it bugs out. $<$:Brotli::common> $<$:Brotli::encoder>