mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-03 17:43:49 +08:00
6706cf05f0
* Update to OpenSSL 3.0.8 * update manifests
45 lines
1.9 KiB
CMake
45 lines
1.9 KiB
CMake
vcpkg_minimum_required(VERSION 2022-10-12) # for ${VERSION}
|
|
if(EXISTS "${CURRENT_INSTALLED_DIR}/share/libressl/copyright"
|
|
OR EXISTS "${CURRENT_INSTALLED_DIR}/share/boringssl/copyright")
|
|
message(FATAL_ERROR "Can't build openssl if libressl/boringssl is installed. Please remove libressl/boringssl, and try install openssl again if you need it.")
|
|
endif()
|
|
|
|
if (VCPKG_TARGET_IS_LINUX)
|
|
message(WARNING
|
|
[[openssl currently requires the following library from the system package manager:
|
|
linux-headers
|
|
It can be installed on alpine systems via apk add linux-headers.]]
|
|
)
|
|
endif()
|
|
|
|
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO openssl/openssl
|
|
REF "openssl-${VERSION}"
|
|
SHA512 5a821aaaaa89027ce08a347e5fc216757c2971e29f7d24792609378c54f657839b3775bf639e7330b28b4f96ef0d32869f0a96afcb25c8a2e1c2fe51a6eb4aa3
|
|
PATCHES
|
|
windows/install-layout.patch
|
|
windows/install-pdbs.patch
|
|
windows/umul128-arm64.patch # Fixed upstream in https://github.com/openssl/openssl/pull/20244, but not released as of 3.0.8
|
|
)
|
|
|
|
vcpkg_find_acquire_program(PERL)
|
|
get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY)
|
|
vcpkg_add_to_path("${PERL_EXE_PATH}")
|
|
|
|
if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
|
|
include("${CMAKE_CURRENT_LIST_DIR}/windows/portfile.cmake")
|
|
include("${CMAKE_CURRENT_LIST_DIR}/install-pc-files.cmake")
|
|
else()
|
|
include("${CMAKE_CURRENT_LIST_DIR}/unix/portfile.cmake")
|
|
endif()
|
|
|
|
if (NOT "${VERSION}" MATCHES [[^([0-9]+)\.([0-9]+)\.([0-9]+)$]])
|
|
message(FATAL_ERROR "Version regex did not match.")
|
|
endif()
|
|
set(OPENSSL_VERSION_MAJOR "${CMAKE_MATCH_1}")
|
|
set(OPENSSL_VERSION_MINOR "${CMAKE_MATCH_2}")
|
|
set(OPENSSL_VERSION_FIX "${CMAKE_MATCH_3}")
|
|
configure_file("${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake.in" "${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg-cmake-wrapper.cmake" @ONLY)
|
|
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|