mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-02 16:39:25 +08:00
a61559a81b
* [openssl] Change repo to github and update to 3.0.4 * version
44 lines
1.7 KiB
CMake
44 lines
1.7 KiB
CMake
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()
|
|
|
|
set(OPENSSL_VERSION 3.0.4)
|
|
|
|
if (VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_UWP)
|
|
set(OPENSSL_PATCHES "${CMAKE_CURRENT_LIST_DIR}/windows/flags.patch")
|
|
endif()
|
|
|
|
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO openssl/openssl
|
|
REF openssl-${OPENSSL_VERSION}
|
|
SHA512 c58b439addbfc0901cb8d99036494bac60d24a4311815b9b7a559f5daaa027d4b83e49e2eb526f0552ec53f09be89081a08c20b8b6f20a2463081cdb071d6faf
|
|
PATCHES ${OPENSSL_PATCHES}
|
|
)
|
|
|
|
vcpkg_find_acquire_program(PERL)
|
|
get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY)
|
|
vcpkg_add_to_path("${PERL_EXE_PATH}")
|
|
|
|
if(VCPKG_TARGET_IS_UWP)
|
|
include("${CMAKE_CURRENT_LIST_DIR}/uwp/portfile.cmake")
|
|
include("${CMAKE_CURRENT_LIST_DIR}/install-pc-files.cmake")
|
|
elseif(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()
|
|
|
|
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}")
|