Fix UWP build

- Do not set _WIN32_WINNT to enable VirtualAllocFromApp
- Disable tlstest since SetHandleInformation is not supported on UWP
This commit is contained in:
kinichiro 2021-05-29 20:23:04 +09:00
parent 31ef9ade60
commit b25111c22d
2 changed files with 20 additions and 15 deletions

View File

@ -116,8 +116,11 @@ if(WIN32)
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
add_definitions(-D_CRT_DEPRECATED_NO_WARNINGS)
add_definitions(-D_REENTRANT -D_POSIX_THREAD_SAFE_FUNCTIONS)
add_definitions(-DWIN32_LEAN_AND_MEAN -D_WIN32_WINNT=0x0600)
add_definitions(-DCPPFLAGS -DNO_SYSLOG -DNO_CRYPT)
add_definitions(-DWIN32_LEAN_AND_MEAN)
if(NOT CMAKE_SYSTEM_NAME MATCHES "WindowsStore")
add_definitions(-D_WIN32_WINNT=0x0600)
endif()
set(PLATFORM_LIBS ${PLATFORM_LIBS} ws2_32 bcrypt)
endif()

View File

@ -512,6 +512,7 @@ target_link_libraries(tlslegacytest ${OPENSSL_LIBS})
add_test(tlslegacytest tlslegacytest)
# tlstest
if(NOT CMAKE_SYSTEM_NAME MATCHES "WindowsStore")
set(TLSTEST_SRC tlstest.c)
check_function_exists(pipe2 HAVE_PIPE2)
if(HAVE_PIPE2)
@ -528,6 +529,7 @@ else()
add_test(NAME tlstest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/tlstest.bat $<TARGET_FILE:tlstest>)
endif()
set_tests_properties(tlstest PROPERTIES ENVIRONMENT "srcdir=${TEST_SOURCE_DIR}")
endif()
# tls_ext_alpn
if(NOT BUILD_SHARED_LIBS)