endif()
option(CURL_USE_PKGCONFIG "Enable pkg-config to detect dependencies" ${_curl_use_pkgconfig_default})
-# Initialize CURL_LIBS
+# Initialize variables collecting dependency libs, paths, pkg-config names.
set(CURL_LIBS "")
set(CURL_LIBDIRS "")
set(LIBCURL_PC_REQUIRES_PRIVATE "")
mark_as_advanced(ENABLE_IPV6)
if(ENABLE_IPV6 AND NOT WIN32)
include(CheckStructHasMember)
- check_struct_has_member("struct sockaddr_in6" "sin6_addr" "netinet/in.h"
- HAVE_SOCKADDR_IN6_SIN6_ADDR)
- check_struct_has_member("struct sockaddr_in6" "sin6_scope_id" "netinet/in.h"
- HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID)
+ check_struct_has_member("struct sockaddr_in6" "sin6_addr" "netinet/in.h" HAVE_SOCKADDR_IN6_SIN6_ADDR)
+ check_struct_has_member("struct sockaddr_in6" "sin6_scope_id" "netinet/in.h" HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID)
if(NOT HAVE_SOCKADDR_IN6_SIN6_ADDR)
message(WARNING "struct sockaddr_in6 not available, disabling IPv6 support")
# Force the feature off as this name is used as guard macro...
endif()
if(APPLE)
- cmake_dependent_option(CURL_USE_SECTRANSP "Enable Apple OS native SSL/TLS" OFF CURL_ENABLE_SSL OFF)
+ cmake_dependent_option(CURL_USE_SECTRANSP "Enable Apple OS native SSL/TLS (Secure Transport)" OFF CURL_ENABLE_SSL OFF)
endif()
if(WIN32)
- cmake_dependent_option(CURL_USE_SCHANNEL "Enable Windows native SSL/TLS" OFF CURL_ENABLE_SSL OFF)
+ cmake_dependent_option(CURL_USE_SCHANNEL "Enable Windows native SSL/TLS (Schannel)" OFF CURL_ENABLE_SSL OFF)
option(CURL_WINDOWS_SSPI "Enable SSPI on Windows" ${CURL_USE_SCHANNEL})
endif()
cmake_dependent_option(CURL_USE_MBEDTLS "Enable mbedTLS for SSL/TLS" OFF CURL_ENABLE_SSL OFF)
list(APPEND LIBCURL_PC_REQUIRES_PRIVATE "heimdal-gssapi")
endif()
else()
- message(WARNING "GSSAPI support has been requested but no supporting libraries found. Skipping.")
+ message(WARNING "GSSAPI has been requested, but no supporting libraries found. Skipping.")
endif()
endif()
list(APPEND CURL_LIBS "winmm")
endif()
else()
- message(WARNING "librtmp requested, but not found or missing OpenSSL. Skipping.")
+ message(WARNING "librtmp has been requested, but not found or missing OpenSSL. Skipping.")
set(USE_LIBRTMP OFF)
endif()
endif()
check_symbol_exists("fsetxattr" "${CURL_INCLUDES}" HAVE_FSETXATTR)
if(HAVE_FSETXATTR)
- foreach(_curl_test IN ITEMS HAVE_FSETXATTR_5 HAVE_FSETXATTR_6)
- curl_internal_test(${_curl_test})
- endforeach()
+ curl_internal_test(HAVE_FSETXATTR_5)
+ curl_internal_test(HAVE_FSETXATTR_6)
endif()
set(CMAKE_EXTRA_INCLUDE_FILES "sys/socket.h")
endif()
endif()
-foreach(_curl_test IN ITEMS
- HAVE_GLIBC_STRERROR_R
- HAVE_POSIX_STRERROR_R
- )
- curl_internal_test(${_curl_test})
-endforeach()
+curl_internal_test(HAVE_GLIBC_STRERROR_R)
+curl_internal_test(HAVE_POSIX_STRERROR_R)
# Check for reentrant
foreach(_curl_test IN ITEMS
endif()
if(NOT WIN32)
- # Check clock_gettime(CLOCK_MONOTONIC, x) support
- curl_internal_test(HAVE_CLOCK_GETTIME_MONOTONIC)
+ curl_internal_test(HAVE_CLOCK_GETTIME_MONOTONIC) # Check clock_gettime(CLOCK_MONOTONIC, x) support
endif()
if(APPLE)
- # Check compiler support of __builtin_available()
- curl_internal_test(HAVE_BUILTIN_AVAILABLE)
+ curl_internal_test(HAVE_BUILTIN_AVAILABLE) # Check compiler support of __builtin_available()
endif()
# Some other minor tests
if(CURL_LTO)
if(CMAKE_VERSION VERSION_LESS 3.9)
- message(FATAL_ERROR "Requested LTO but your cmake version ${CMAKE_VERSION} is to old. You need at least 3.9")
+ message(FATAL_ERROR "LTO has been requested, but your cmake version ${CMAKE_VERSION} is to old. You need at least 3.9")
endif()
cmake_policy(SET CMP0069 NEW)
if(CURL_HAS_LTO)
message(STATUS "LTO supported and enabled")
else()
- message(FATAL_ERROR "LTO was requested - but compiler does not support it\n${CURL_LTO_ERROR}")
+ message(FATAL_ERROR "LTO has been requested, but the compiler does not support it\n${CURL_LTO_ERROR}")
endif()
endif()
# SPDX-License-Identifier: curl
#
###########################################################################
-set(LIB_NAME libcurl)
-set(LIBCURL_OUTPUT_NAME libcurl CACHE STRING "Basename of the curl library")
+set(LIB_NAME "libcurl")
+set(LIBCURL_OUTPUT_NAME "libcurl" CACHE STRING "Basename of the curl library")
add_definitions("-DBUILDING_LIBCURL")
configure_file("curl_config.h.cmake" "${CMAKE_CURRENT_BINARY_DIR}/curl_config.h")
if(CYGWIN)
# For Cygwin always compile dllmain.c as a separate unit since it
# includes windows.h, which should not be included in other units.
- set_source_files_properties("dllmain.c" PROPERTIES
- SKIP_UNITY_BUILD_INCLUSION ON)
+ set_source_files_properties("dllmain.c" PROPERTIES SKIP_UNITY_BUILD_INCLUSION ON)
endif()
set_property(TARGET ${LIB_SHARED} APPEND PROPERTY SOURCES "dllmain.c")
endif()