pineapple-src/externals/vcpkg/ports/ms-quic/fix-platform.patch

57 lines
2.6 KiB
Diff
Raw Normal View History

2022-07-23 03:01:36 +02:00
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0b670cf..f94f4c6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -309,7 +309,7 @@ if(WIN32)
endif()
else()
# Just doing a normal build. Use the PGD file if present.
- if(EXISTS "${QUIC_PGO_FILE}")
+ if(FALSE)
message(STATUS "Using profile-guided optimization")
configure_file("${QUIC_PGO_FILE}" "${QUIC_OUTPUT_DIR}/msquic.pgd" COPYONLY)
set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /USEPROFILE:PGD=${QUIC_OUTPUT_DIR}/msquic.pgd")
@@ -387,21 +387,29 @@ endif()
if(QUIC_TLS STREQUAL "openssl")
if (WIN32)
if (QUIC_UWP_BUILD)
- message(FATAL_ERROR "UWP is not supported with OpenSSL")
- endif()
-
- if (${CMAKE_GENERATOR_PLATFORM} STREQUAL "arm64")
- set(QUIC_OPENSSL_WIN_ARCH "VC-WIN64-ARM")
- elseif (${CMAKE_GENERATOR_PLATFORM} STREQUAL "arm")
- set(QUIC_OPENSSL_WIN_ARCH "VC-WIN32-ARM")
- elseif (${CMAKE_GENERATOR_PLATFORM} STREQUAL "Win32")
- set(QUIC_OPENSSL_WIN_ARCH "VC-WIN32")
- elseif (${CMAKE_GENERATOR_PLATFORM} STREQUAL "x64")
- set(QUIC_OPENSSL_WIN_ARCH "VC-WIN64A")
+ if (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64")
+ set(QUIC_OPENSSL_WIN_ARCH "VC-WIN64-ARM")
+ elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm")
+ set(QUIC_OPENSSL_WIN_ARCH "VC-WIN32-ARM")
+ elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
+ set(QUIC_OPENSSL_WIN_ARCH "VC-WIN32-ONECORE")
+ elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
+ set(QUIC_OPENSSL_WIN_ARCH "VC-WIN64A-ONECORE")
+ endif()
else()
- message(FATAL_ERROR "Unknown Generator Platform ${CMAKE_GENERATOR_PLATFORM}")
+ if (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64")
+ set(QUIC_OPENSSL_WIN_ARCH "VC-WIN64-ARM")
+ elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm")
+ set(QUIC_OPENSSL_WIN_ARCH "VC-WIN32-ARM")
+ elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
+ set(QUIC_OPENSSL_WIN_ARCH "VC-WIN32")
+ elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
+ set(QUIC_OPENSSL_WIN_ARCH "VC-WIN64A")
+ endif()
+ endif()
+ if(NOT DEFINED QUIC_OPENSSL_WIN_ARCH)
+ message(FATAL_ERROR "Unknown Platform ${VCPKG_TARGET_ARCHITECTURE}")
endif()
-
set(OPENSSL_DIR ${QUIC_BUILD_DIR}/openssl)
add_library(OpenSSL_Crypto STATIC IMPORTED)