Andrew Geissler | bffdb3e | 2020-08-21 16:13:29 -0500 | [diff] [blame] | 1 | diff -urN -x .git orig/cmake/LibreSSL.cmake patched/cmake/LibreSSL.cmake |
| 2 | --- orig/cmake/LibreSSL.cmake 2020-08-07 21:58:34.660773928 +0900 |
| 3 | +++ patched/cmake/LibreSSL.cmake 2020-08-07 22:51:18.620767245 +0900 |
| 4 | @@ -18,6 +18,9 @@ |
| 5 | function(use_libre_ssl SOURCE_DIR BINARY_DIR) |
| 6 | message("Using bundled LibreSSL from release") |
| 7 | |
| 8 | + find_package(Patch REQUIRED) |
| 9 | + set(PATCH "${Patch_EXECUTABLE}" -p1 -i "${SOURCE_DIR}/thirdparty/libressl/avoid-BSWAP-assembly-for-ARM-v6.patch") |
| 10 | + |
| 11 | set(BYPRODUCT_PREFIX "lib" CACHE STRING "" FORCE) |
| 12 | set(BYPRODUCT_SUFFIX ".a" CACHE STRING "" FORCE) |
| 13 | |
| 14 | @@ -27,16 +30,29 @@ |
| 15 | set(BYPRODUCT_PREFIX "" CACHE STRING "" FORCE) |
| 16 | set(BUILD_ARGS " -GVisual Studio 15 2017") |
| 17 | endif(WIN32) |
| 18 | + |
| 19 | + set(BYPRODUCTS |
| 20 | + "lib/${BYPRODUCT_PREFIX}crypto${BYPRODUCT_SUFFIX}" |
| 21 | + "lib/${BYPRODUCT_PREFIX}ssl${BYPRODUCT_SUFFIX}" |
| 22 | + "lib/${BYPRODUCT_PREFIX}tls${BYPRODUCT_SUFFIX}" |
| 23 | + ) |
| 24 | + set(LIBRESSL_INSTALL_DIR "${BINARY_DIR}/thirdparty/libressl-install" CACHE STRING "" FORCE) |
| 25 | + FOREACH(BYPRODUCT ${BYPRODUCTS}) |
| 26 | + LIST(APPEND LIBRESSL_LIBRARIES_LIST "${LIBRESSL_INSTALL_DIR}/${BYPRODUCT}") |
| 27 | + ENDFOREACH(BYPRODUCT) |
| 28 | + |
| 29 | ExternalProject_Add( |
| 30 | libressl-portable |
| 31 | URL https://cdn.openbsd.org/pub/OpenBSD/LibreSSL/libressl-2.8.3.tar.gz https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-2.8.3.tar.gz https://gentoo.osuosl.org/distfiles/libressl-2.8.3.tar.gz |
| 32 | URL_HASH "SHA256=9b640b13047182761a99ce3e4f000be9687566e0828b4a72709e9e6a3ef98477" |
| 33 | SOURCE_DIR "${BINARY_DIR}/thirdparty/libressl-src" |
| 34 | + PATCH_COMMAND ${PATCH} |
| 35 | CMAKE_ARGS ${PASSTHROUGH_CMAKE_ARGS} |
| 36 | "-DCMAKE_INSTALL_PREFIX=${BINARY_DIR}/thirdparty/libressl-install" |
| 37 | "-DLIBRESSL_APPS=OFF" |
| 38 | "-DLIBRESSL_TESTS=OFF" |
| 39 | "${BUILD_ARGS}" |
| 40 | + BUILD_BYPRODUCTS ${LIBRESSL_LIBRARIES_LIST} |
| 41 | ) |
| 42 | |
| 43 | add_library(crypto STATIC IMPORTED) |