mirror of
https://github.com/curl/curl.git
synced 2026-05-30 04:07:27 +03:00
cmake: fix to restrict SystemConfiguration to macOS
Also fix indentation and tidy up to use `STREQUAL` when checking for
Darwin.
Reported-by: Waldemar Kornewald
Fixes #18149
Regression from 739ef9804d #13713
Closes #18153
This commit is contained in:
parent
40caca581f
commit
38672f2eaf
2 changed files with 3 additions and 3 deletions
|
|
@ -355,7 +355,7 @@ if(WIN32)
|
|||
endif()
|
||||
|
||||
# Override to force-disable or force-enable the use of pkg-config.
|
||||
if((UNIX AND NOT ANDROID AND (NOT APPLE OR CMAKE_SYSTEM_NAME MATCHES "Darwin")) OR
|
||||
if((UNIX AND NOT ANDROID AND (NOT APPLE OR CMAKE_SYSTEM_NAME STREQUAL "Darwin")) OR
|
||||
VCPKG_TOOLCHAIN OR
|
||||
(MINGW AND NOT CMAKE_CROSSCOMPILING))
|
||||
set(_curl_use_pkgconfig_default ON)
|
||||
|
|
@ -653,7 +653,7 @@ if(ENABLE_IPV6)
|
|||
set(ENABLE_IPV6 OFF CACHE BOOL "Enable IPv6 support" FORCE) # Force the feature off as we use this name as guard macro
|
||||
endif()
|
||||
|
||||
if(APPLE AND NOT ENABLE_ARES)
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND NOT ENABLE_ARES)
|
||||
set(_use_core_foundation_and_core_services ON)
|
||||
|
||||
find_library(SYSTEMCONFIGURATION_FRAMEWORK NAMES "SystemConfiguration")
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ AC_MSG_CHECKING([whether to link macOS CoreFoundation, CoreServices, and SystemC
|
|||
#if TARGET_OS_MAC && !(defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE)
|
||||
return 0;
|
||||
#else
|
||||
#error Not macOS
|
||||
#error Not macOS
|
||||
#endif
|
||||
]])
|
||||
],[
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue