endif()
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND NOT ENABLE_ARES)
- set(use_core_foundation ON)
+ set(use_core_foundation_and_core_services ON)
find_library(SYSTEMCONFIGURATION_FRAMEWORK "SystemConfiguration")
if(NOT SYSTEMCONFIGURATION_FRAMEWORK)
endif()
if(CURL_USE_SECTRANSP)
- set(use_core_foundation ON)
+ set(use_core_foundation_and_core_services ON)
find_library(SECURITY_FRAMEWORK "Security")
if(NOT SECURITY_FRAMEWORK)
list(APPEND CURL_LIBS "-framework Security")
endif()
-if(use_core_foundation)
+if(use_core_foundation_and_core_services)
find_library(COREFOUNDATION_FRAMEWORK "CoreFoundation")
+ find_library(CORESERVICES_FRAMEWORK "CoreServices")
+
if(NOT COREFOUNDATION_FRAMEWORK)
message(FATAL_ERROR "CoreFoundation framework not found")
endif()
+ if(NOT CORESERVICES_FRAMEWORK)
+ message(FATAL_ERROR "CoreServices framework not found")
+ endif()
- list(APPEND CURL_LIBS "-framework CoreFoundation")
+ list(APPEND CURL_LIBS "-framework CoreFoundation -framework CoreServices")
endif()
if(CURL_USE_OPENSSL)
ssl_msg="Secure Transport"
test secure-transport != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
SECURETRANSPORT_ENABLED=1
- LDFLAGS="$LDFLAGS -framework CoreFoundation -framework Security"
+ LDFLAGS="$LDFLAGS -framework CoreFoundation -framework CoreServices -framework Security"
else
AC_MSG_RESULT(no)
fi
#***************************************************************************
AC_DEFUN([CURL_DARWIN_SYSTEMCONFIGURATION], [
-AC_MSG_CHECKING([whether to link macOS CoreFoundation and SystemConfiguration framework])
+AC_MSG_CHECKING([whether to link macOS CoreFoundation, CoreServices, and SystemConfiguration frameworks])
case $host_os in
darwin*)
AC_COMPILE_IFELSE([
])
if test "x$build_for_macos" != xno; then
AC_MSG_RESULT(yes)
- LDFLAGS="$LDFLAGS -framework CoreFoundation -framework SystemConfiguration"
+ LDFLAGS="$LDFLAGS -framework CoreFoundation -framework CoreServices -framework SystemConfiguration"
else
AC_MSG_RESULT(no)
fi