diff options
author | kinichiro <kinichiro.inoguchi@gmail.com> | 2021-05-29 20:23:04 +0900 |
---|---|---|
committer | kinichiro <kinichiro.inoguchi@gmail.com> | 2021-05-29 20:55:50 +0900 |
commit | b25111c22da96c839bad46cfbd49e030a3b03fb2 (patch) | |
tree | df749d826cb493be1e36a05f258c5fb5ae5c20eb | |
parent | 31ef9ade60a19d369efc81528283d0c8735637cc (diff) | |
download | portable-b25111c22da96c839bad46cfbd49e030a3b03fb2.tar.gz portable-b25111c22da96c839bad46cfbd49e030a3b03fb2.tar.bz2 portable-b25111c22da96c839bad46cfbd49e030a3b03fb2.zip |
Fix UWP build
- Do not set _WIN32_WINNT to enable VirtualAllocFromApp
- Disable tlstest since SetHandleInformation is not supported on UWP
-rw-r--r-- | CMakeLists.txt | 5 | ||||
-rw-r--r-- | tests/CMakeLists.txt | 30 |
2 files changed, 20 insertions, 15 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 06d9186..b37b3f5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt | |||
@@ -116,8 +116,11 @@ if(WIN32) | |||
116 | add_definitions(-D_CRT_SECURE_NO_WARNINGS) | 116 | add_definitions(-D_CRT_SECURE_NO_WARNINGS) |
117 | add_definitions(-D_CRT_DEPRECATED_NO_WARNINGS) | 117 | add_definitions(-D_CRT_DEPRECATED_NO_WARNINGS) |
118 | add_definitions(-D_REENTRANT -D_POSIX_THREAD_SAFE_FUNCTIONS) | 118 | add_definitions(-D_REENTRANT -D_POSIX_THREAD_SAFE_FUNCTIONS) |
119 | add_definitions(-DWIN32_LEAN_AND_MEAN -D_WIN32_WINNT=0x0600) | ||
120 | add_definitions(-DCPPFLAGS -DNO_SYSLOG -DNO_CRYPT) | 119 | add_definitions(-DCPPFLAGS -DNO_SYSLOG -DNO_CRYPT) |
120 | add_definitions(-DWIN32_LEAN_AND_MEAN) | ||
121 | if(NOT CMAKE_SYSTEM_NAME MATCHES "WindowsStore") | ||
122 | add_definitions(-D_WIN32_WINNT=0x0600) | ||
123 | endif() | ||
121 | set(PLATFORM_LIBS ${PLATFORM_LIBS} ws2_32 bcrypt) | 124 | set(PLATFORM_LIBS ${PLATFORM_LIBS} ws2_32 bcrypt) |
122 | endif() | 125 | endif() |
123 | 126 | ||
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 52acbba..a816751 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt | |||
@@ -512,22 +512,24 @@ target_link_libraries(tlslegacytest ${OPENSSL_LIBS}) | |||
512 | add_test(tlslegacytest tlslegacytest) | 512 | add_test(tlslegacytest tlslegacytest) |
513 | 513 | ||
514 | # tlstest | 514 | # tlstest |
515 | set(TLSTEST_SRC tlstest.c) | 515 | if(NOT CMAKE_SYSTEM_NAME MATCHES "WindowsStore") |
516 | check_function_exists(pipe2 HAVE_PIPE2) | 516 | set(TLSTEST_SRC tlstest.c) |
517 | if(HAVE_PIPE2) | 517 | check_function_exists(pipe2 HAVE_PIPE2) |
518 | add_definitions(-DHAVE_PIPE2) | 518 | if(HAVE_PIPE2) |
519 | else() | 519 | add_definitions(-DHAVE_PIPE2) |
520 | set(TLSTEST_SRC ${TLSTEST_SRC} compat/pipe2.c) | 520 | else() |
521 | endif() | 521 | set(TLSTEST_SRC ${TLSTEST_SRC} compat/pipe2.c) |
522 | endif() | ||
522 | 523 | ||
523 | add_executable(tlstest ${TLSTEST_SRC}) | 524 | add_executable(tlstest ${TLSTEST_SRC}) |
524 | target_link_libraries(tlstest ${LIBTLS_LIBS}) | 525 | target_link_libraries(tlstest ${LIBTLS_LIBS}) |
525 | if(NOT MSVC) | 526 | if(NOT MSVC) |
526 | add_test(NAME tlstest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/tlstest.sh) | 527 | add_test(NAME tlstest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/tlstest.sh) |
527 | else() | 528 | else() |
528 | add_test(NAME tlstest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/tlstest.bat $<TARGET_FILE:tlstest>) | 529 | add_test(NAME tlstest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/tlstest.bat $<TARGET_FILE:tlstest>) |
530 | endif() | ||
531 | set_tests_properties(tlstest PROPERTIES ENVIRONMENT "srcdir=${TEST_SOURCE_DIR}") | ||
529 | endif() | 532 | endif() |
530 | set_tests_properties(tlstest PROPERTIES ENVIRONMENT "srcdir=${TEST_SOURCE_DIR}") | ||
531 | 533 | ||
532 | # tls_ext_alpn | 534 | # tls_ext_alpn |
533 | if(NOT BUILD_SHARED_LIBS) | 535 | if(NOT BUILD_SHARED_LIBS) |