2019-09-27 05:31:55 +08:00
|
|
|
vcpkg_buildpath_length_warning(37)
|
2019-03-27 17:40:19 +08:00
|
|
|
|
2019-01-25 07:53:13 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO aws/aws-sdk-cpp
|
2020-11-10 07:27:51 +08:00
|
|
|
REF e98e5732ec7319051f162f7314ae361c85d0a8c9 # 1.8.83
|
|
|
|
SHA512 da540db60551be833ea0315dd93241f9740ab953ed5657c1c7a8c401ae52a4e75b116758420b0a8a4ebb79358dff8377f5e052b180b36f0af27a36003f28bd56
|
2019-01-25 07:53:13 +08:00
|
|
|
HEAD_REF master
|
|
|
|
)
|
|
|
|
|
|
|
|
string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "dynamic" FORCE_SHARED_CRT)
|
|
|
|
|
|
|
|
set(BUILD_ONLY core)
|
|
|
|
|
|
|
|
include(${CMAKE_CURRENT_LIST_DIR}/compute_build_only.cmake)
|
|
|
|
|
2020-10-27 10:30:27 +08:00
|
|
|
string(REPLACE ";" "\\\\\\\\\\;" BUILD_ONLY "${BUILD_ONLY}")
|
2019-01-25 07:53:13 +08:00
|
|
|
|
|
|
|
vcpkg_configure_cmake(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
2020-02-04 06:22:52 +08:00
|
|
|
DISABLE_PARALLEL_CONFIGURE
|
2019-01-25 07:53:13 +08:00
|
|
|
PREFER_NINJA
|
|
|
|
OPTIONS
|
|
|
|
-DENABLE_UNITY_BUILD=ON
|
|
|
|
-DENABLE_TESTING=OFF
|
|
|
|
-DFORCE_SHARED_CRT=${FORCE_SHARED_CRT}
|
|
|
|
-DCMAKE_DISABLE_FIND_PACKAGE_Git=TRUE
|
2020-10-27 10:30:27 +08:00
|
|
|
-DBUILD_ONLY=${BUILD_ONLY}
|
2019-01-25 07:53:13 +08:00
|
|
|
-DBUILD_DEPS=OFF
|
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_install_cmake()
|
|
|
|
|
|
|
|
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake TARGET_PATH share)
|
|
|
|
|
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|
|
|
|
file(GLOB_RECURSE AWS_TARGETS "${CURRENT_PACKAGES_DIR}/share/*/*-targets-*.cmake")
|
|
|
|
foreach(AWS_TARGET IN LISTS AWS_TARGETS)
|
|
|
|
file(READ ${AWS_TARGET} _contents)
|
|
|
|
string(REGEX REPLACE
|
|
|
|
"bin\\/([A-Za-z0-9_.-]+\\.lib)"
|
|
|
|
"lib/\\1"
|
|
|
|
_contents "${_contents}")
|
|
|
|
file(WRITE ${AWS_TARGET} "${_contents}")
|
|
|
|
endforeach()
|
|
|
|
|
|
|
|
file(GLOB AWS_CONFIGS "${CURRENT_PACKAGES_DIR}/share/*/aws-cpp-sdk-*-config.cmake")
|
|
|
|
list(FILTER AWS_CONFIGS EXCLUDE REGEX "aws-cpp-sdk-core-config\\.cmake\$")
|
|
|
|
foreach(AWS_CONFIG IN LISTS AWS_CONFIGS)
|
|
|
|
file(READ "${AWS_CONFIG}" _contents)
|
|
|
|
file(WRITE "${AWS_CONFIG}" "include(CMakeFindDependencyMacro)\nfind_dependency(aws-cpp-sdk-core)\n${_contents}")
|
|
|
|
endforeach()
|
|
|
|
|
|
|
|
file(REMOVE_RECURSE
|
|
|
|
${CURRENT_PACKAGES_DIR}/debug/include
|
|
|
|
${CURRENT_PACKAGES_DIR}/debug/share
|
|
|
|
${CURRENT_PACKAGES_DIR}/share/AWSSDK
|
|
|
|
${CURRENT_PACKAGES_DIR}/lib/pkgconfig
|
|
|
|
${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig
|
|
|
|
${CURRENT_PACKAGES_DIR}/nuget
|
|
|
|
${CURRENT_PACKAGES_DIR}/debug/nuget
|
|
|
|
)
|
|
|
|
|
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
|
|
|
file(GLOB LIB_FILES ${CURRENT_PACKAGES_DIR}/bin/*.lib)
|
|
|
|
if(LIB_FILES)
|
|
|
|
file(COPY ${LIB_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
|
|
|
|
file(REMOVE ${LIB_FILES})
|
|
|
|
endif()
|
|
|
|
file(GLOB DEBUG_LIB_FILES ${CURRENT_PACKAGES_DIR}/debug/bin/*.lib)
|
|
|
|
if(DEBUG_LIB_FILES)
|
|
|
|
file(COPY ${DEBUG_LIB_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
|
|
|
|
file(REMOVE ${DEBUG_LIB_FILES})
|
|
|
|
endif()
|
|
|
|
|
|
|
|
file(APPEND ${CURRENT_PACKAGES_DIR}/include/aws/core/SDKConfig.h "#ifndef USE_IMPORT_EXPORT\n#define USE_IMPORT_EXPORT\n#endif")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
# Handle copyright
|
2020-01-31 06:43:34 +08:00
|
|
|
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|