From 00a922bec508cf85192ca48b3868ed438e245c4d Mon Sep 17 00:00:00 2001 From: Carter Green Date: Wed, 10 Dec 2025 09:51:24 -0600 Subject: [PATCH] Fix linker error on macOS --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8a8ab0a8d0..7566dcd807 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>