@@ -111,12 +111,16 @@ option(HTTPLIB_REQUIRE_ZSTD "Requires ZSTD to be found & linked, or fails build.
111
111
option (HTTPLIB_USE_ZSTD_IF_AVAILABLE "Uses ZSTD (if available) to enable zstd support." ON )
112
112
# Defaults to static library
113
113
option (BUILD_SHARED_LIBS "Build the library as a shared library instead of static. Has no effect if using header-only." OFF )
114
- if (BUILD_SHARED_LIBS AND WIN32 AND HTTPLIB_COMPILE )
114
+ if (BUILD_SHARED_LIBS AND WIN32 AND HTTPLIB_COMPILE )
115
115
# Necessary for Windows if building shared libs
116
116
# See https://stackoverflow.com/a/40743080
117
117
set (CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON )
118
118
endif ()
119
119
120
+ if ( CMAKE_SYSTEM_NAME MATCHES "Windows" AND ${CMAKE_SYSTEM_VERSION} VERSION_LESS "10.0.0" )
121
+ message (SEND_ERROR "Windows ${CMAKE_SYSTEM_VERSION} or lower is not supported. Please use Windows 10 or later." )
122
+ endif ()
123
+
120
124
# Set some variables that are used in-tree and while building based on our options
121
125
set (HTTPLIB_IS_COMPILED ${HTTPLIB_COMPILE} )
122
126
set (HTTPLIB_IS_USING_CERTS_FROM_MACOSX_KEYCHAIN ${HTTPLIB_USE_CERTS_FROM_MACOSX_KEYCHAIN} )
@@ -243,8 +247,8 @@ add_library(${PROJECT_NAME}::${PROJECT_NAME} ALIAS ${PROJECT_NAME})
243
247
target_compile_features (${PROJECT_NAME} ${_INTERFACE_OR_PUBLIC} cxx_std_11 )
244
248
245
249
target_include_directories (${PROJECT_NAME} SYSTEM ${_INTERFACE_OR_PUBLIC}
246
- $< BUILD_INTERFACE:${_httplib_build_includedir} >
247
- $< INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR} >
250
+ $< BUILD_INTERFACE:${_httplib_build_includedir} >
251
+ $< INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR} >
248
252
)
249
253
250
254
# Always require threads
@@ -340,6 +344,6 @@ if(HTTPLIB_INSTALL)
340
344
endif ()
341
345
342
346
if (HTTPLIB_TEST )
343
- include (CTest )
344
- add_subdirectory (test )
347
+ include (CTest )
348
+ add_subdirectory (test )
345
349
endif ()
0 commit comments