vcpkg/ports/aws-crt-cpp/portfile.cmake
Ahmed Yarub Hani Al Nuaimi 8b4ff54ecd
Fix aws-sdk-cpp and OpenSSL cross-platform builds (#20289)
* Fix Aws Crypto Abstraction Layer and S2N builds

* Fix aws-c-cal build

* Revert changes

* [s2n] update to 1.1.0

* Do not build tests for any of AWS SDK for C++ dependencies
Remove unused flags from OpenSSL and AWS SDK for C++ builds

* Update versions

* Fix indentation

* Fix indentation

* Remove redundant flags

* Remove redundant options

* Update ports/aws-c-auth/portfile.cmake

Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com>

* Update ports/aws-c-cal/002-no-exe-no-tests.patch

Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com>

* Update ports/aws-c-cal/portfile.cmake

Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com>

* Update ports/aws-c-cal/portfile.cmake

Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com>

* Update ports/aws-c-compression/portfile.cmake

Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com>

* Update ports/aws-crt-cpp/portfile.cmake

Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com>

* Update ports/aws-checksums/portfile.cmake

Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com>

* Update ports/aws-c-event-stream/portfile.cmake

Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com>

* Update ports/aws-c-s3/portfile.cmake

Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com>

* Update ports/aws-c-http/portfile.cmake

Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com>

* Update ports/aws-c-io/portfile.cmake

Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com>

* Update ports/aws-c-mqtt/portfile.cmake

Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com>

* Simplify patch
Restore PREFER_NINJA for OpenSSL build

* Update versions

* Replace deprecated methods

* Update versions

* Fix dependencies of OpenSSL

* Fix dependencies of OpenSSL

* Update ports/aws-c-cal/portfile.cmake

Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com>

* Update ports/aws-c-io/portfile.cmake

Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com>

* Update ports/aws-c-io/portfile.cmake

Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com>

* Fix versions

* Revert quotation mark change

* Revert quotation mark change

* Revert quotation mark change

* Patch AWS CRT for C++ for iOS build
Do not copy sha256_profile tool when building aws-c-cal

* Remove redundant flags

* Fix indentation

* Update versions

* Update versions

* Fix aws-c-cal build
Update versions

* Update versions

* Update versions

* Update versions

* Update versions

* Update versions

* Fix library paths for Windows shared builds

* Revert compiler check

* Update versions

* Fix indentation
Revert OS check

* Update versions

* Fix indentation

* Fix indentation

* Fix indentation

* Update versions/o-/openssl.json

Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com>

* Update versions

* Update versions

* Update versions

Co-authored-by: Ahmed Yarub Hani Al Nuaimi <ahmed.alnuaimi@zwift.com>
Co-authored-by: Charles-Auguste Marois <cmarois@coveo.com>
Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com>
Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
2021-11-22 14:18:07 -08:00

45 lines
1.3 KiB
CMake

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO awslabs/aws-crt-cpp
REF 9ef58ff20df19e613c91c5f761e381c763da6810 # v0.15.1
SHA512 3409b3e6a546ed585b90180807383e8731b36b0db149b5ff92701a43164c4282b1cea4a551bf4c7b1edec7b264098575cf919faee8a2520bb10bbae62258d463
PATCHES
fix-cmake-target-path.patch
fix-ios-build.patch
)
string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" STATIC_CRT)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
DISABLE_PARALLEL_CONFIGURE
OPTIONS
"-DSTATIC_CRT=${STATIC_CRT}"
-DBUILD_DEPS=OFF
"-DCMAKE_MODULE_PATH=${CURRENT_INSTALLED_DIR}/share/aws-c-common" # use extra cmake files
-DBUILD_TESTING=FALSE
)
vcpkg_cmake_install()
vcpkg_cmake_config_fixup(CONFIG_PATH lib/aws-crt-cpp/cmake)
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
file(REMOVE_RECURSE
"${CURRENT_PACKAGES_DIR}/bin"
"${CURRENT_PACKAGES_DIR}/debug/bin"
)
endif()
file(REMOVE_RECURSE
"${CURRENT_PACKAGES_DIR}/debug/include"
"${CURRENT_PACKAGES_DIR}/debug/lib/aws-crt-cpp"
"${CURRENT_PACKAGES_DIR}/lib/aws-crt-cpp"
)
vcpkg_copy_pdbs()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)