mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-23 01:47:55 +08:00
57 lines
2.6 KiB
Diff
57 lines
2.6 KiB
Diff
|
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)
|