Skip to content

Commit e8a8387

Browse files
committed
add condition to check CMAKE_SYSTEM_VERSION defined
1 parent 3f44c80 commit e8a8387

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ if(BUILD_SHARED_LIBS AND WIN32 AND HTTPLIB_COMPILE)
117117
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
118118
endif()
119119

120-
if(CMAKE_SYSTEM_NAME MATCHES "Windows" AND ${CMAKE_SYSTEM_VERSION} VERSION_LESS "10.0.0")
120+
if(CMAKE_SYSTEM_NAME MATCHES "Windows" AND DEFINED CMAKE_SYSTEM_VERSION AND CMAKE_SYSTEM_VERSION VERSION_LESS "10.0.0")
121121
message(SEND_ERROR "Windows ${CMAKE_SYSTEM_VERSION} or lower is not supported. Please use Windows 10 or later.")
122122
endif()
123123
if(CMAKE_SIZEOF_VOID_P LESS 8)

0 commit comments

Comments
 (0)