mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-02 16:49:10 +08:00
6ffa0fc3a4
* Added option to enable fips build for openssl I only implement and tested it for windows as I have no option to do this under linux * Adjusted port version * Updated to support only for Windows * Corrected Formatting * Corrected SHA for vcpkg x-add-version --all * Changes requested by review Removed the not needed FEATURE FIPS Initialize INSTALL_FIPS as empty * Corrected SHA for vcpkg x-add-version --all * Removed Windows only support * Corrected SHA for vcpkg x-add-version --all * Added "supports": "!static" As the provider conecpts needs dynamic linkage * Corrected SHA for vcpkg x-add-version --all
76 lines
2.5 KiB
CMake
76 lines
2.5 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_EMSCRIPTEN)
|
|
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
|
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)
|
|
|
|
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO openssl/openssl
|
|
REF "openssl-${VERSION}"
|
|
SHA512 877b4bc4b59126bdaf626b01322c8ac5325945234acd14907e4a23019f1fd38ec17b5fae9ff60aa9b6b0089c29b0e4255a19cd2a1743c3db82a616286c60d3b9
|
|
PATCHES
|
|
disable-apps.patch
|
|
disable-install-docs.patch
|
|
script-prefix.patch
|
|
windows/install-layout.patch
|
|
windows/install-pdbs.patch
|
|
unix/android-cc.patch
|
|
unix/move-openssldir.patch
|
|
unix/no-empty-dirs.patch
|
|
unix/no-static-libs-for-shared.patch
|
|
)
|
|
|
|
vcpkg_list(SET CONFIGURE_OPTIONS
|
|
enable-static-engine
|
|
enable-capieng
|
|
no-ssl3
|
|
no-weak-ssl-ciphers
|
|
no-tests
|
|
)
|
|
|
|
set(INSTALL_FIPS "")
|
|
if("fips" IN_LIST FEATURES)
|
|
vcpkg_list(APPEND INSTALL_FIPS install_fips)
|
|
vcpkg_list(APPEND CONFIGURE_OPTIONS enable-fips)
|
|
endif()
|
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
|
|
vcpkg_list(APPEND CONFIGURE_OPTIONS shared)
|
|
else()
|
|
vcpkg_list(APPEND CONFIGURE_OPTIONS no-shared no-module)
|
|
endif()
|
|
|
|
if(NOT "tools" IN_LIST FEATURES)
|
|
vcpkg_list(APPEND CONFIGURE_OPTIONS no-apps)
|
|
endif()
|
|
|
|
if(DEFINED OPENSSL_USE_NOPINSHARED)
|
|
vcpkg_list(APPEND CONFIGURE_OPTIONS no-pinshared)
|
|
endif()
|
|
|
|
if(OPENSSL_NO_AUTOLOAD_CONFIG)
|
|
vcpkg_list(APPEND CONFIGURE_OPTIONS no-autoload-config)
|
|
endif()
|
|
|
|
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()
|
|
|
|
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
|
file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|