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

@@ -512,22 +512,24 @@ target_link_libraries(tlslegacytest ${OPENSSL_LIBS})
add_test(tlslegacytest tlslegacytest)
# tlstest
set(TLSTEST_SRC tlstest.c)
check_function_exists(pipe2 HAVE_PIPE2)
if(HAVE_PIPE2)
add_definitions(-DHAVE_PIPE2)
else()
set(TLSTEST_SRC ${TLSTEST_SRC} compat/pipe2.c)
endif()
if(NOT CMAKE_SYSTEM_NAME MATCHES "WindowsStore")
set(TLSTEST_SRC tlstest.c)
check_function_exists(pipe2 HAVE_PIPE2)
if(HAVE_PIPE2)
add_definitions(-DHAVE_PIPE2)
else()
set(TLSTEST_SRC ${TLSTEST_SRC} compat/pipe2.c)
endif()
add_executable(tlstest ${TLSTEST_SRC})
target_link_libraries(tlstest ${LIBTLS_LIBS})
if(NOT MSVC)
add_test(NAME tlstest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/tlstest.sh)
else()
add_test(NAME tlstest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/tlstest.bat $<TARGET_FILE:tlstest>)
add_executable(tlstest ${TLSTEST_SRC})
target_link_libraries(tlstest ${LIBTLS_LIBS})
if(NOT MSVC)
add_test(NAME tlstest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/tlstest.sh)
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()
set_tests_properties(tlstest PROPERTIES ENVIRONMENT "srcdir=${TEST_SOURCE_DIR}")
# tls_ext_alpn
if(NOT BUILD_SHARED_LIBS)