Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 12 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,18 @@ check_include_file("setjmp.h" HAVE_SETJMP_H)
check_symbol_exists(snprintf "stdio.h" HAVE_SNPRINTF)
check_symbol_exists(strcasecmp "strings.h" HAVE_STRCASECMP)

if (WIN32)
if(${CMAKE_GENERATOR_PLATFORM} MATCHES "ARM64")
# https://discourse.cmake.org/t/visual-studio-error-unable-to-deploy-local-file-c-x64-release-zero-check/2072
# Target ZERO_CHECK blocks remote debugger of ARM64 in Visual Studio
set(CMAKE_SUPPRESS_REGENERATION ON)
endif()
check_symbol_exists(ENABLE_VIRTUAL_TERMINAL_PROCESSING "windows.h" HAVE_WIN32_VT100)
# https://github.com/WebAssembly/wabt/issues/2609
# Fix issue where Windows 11 doesn't ship with expected libcrypto DLL and so wasm2c doesn't work.
set(USE_INTERNAL_SHA256 ON)
endif ()

if (NOT USE_INTERNAL_SHA256)
find_package(OpenSSL QUIET)
if (OpenSSL_FOUND)
Expand All @@ -118,15 +130,6 @@ if (NOT USE_INTERNAL_SHA256)
endif()
endif()

if (WIN32)
if(${CMAKE_GENERATOR_PLATFORM} MATCHES "ARM64")
# https://discourse.cmake.org/t/visual-studio-error-unable-to-deploy-local-file-c-x64-release-zero-check/2072
# Target ZERO_CHECK blocks remote debugger of ARM64 in Visual Studio
set(CMAKE_SUPPRESS_REGENERATION ON)
endif()
check_symbol_exists(ENABLE_VIRTUAL_TERMINAL_PROCESSING "windows.h" HAVE_WIN32_VT100)
endif ()

include(CheckTypeSize)
check_type_size(ssize_t SSIZE_T)
check_type_size(size_t SIZEOF_SIZE_T)
Expand Down
Loading