2016-11-28 19:15:42 +08:00
|
|
|
include(vcpkg_common_functions)
|
2016-12-24 21:36:21 +08:00
|
|
|
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/aws-sdk-cpp-1.0.47)
|
2016-11-28 19:15:42 +08:00
|
|
|
vcpkg_download_distfile(ARCHIVE
|
2016-12-24 21:36:21 +08:00
|
|
|
URLS "https://github.com/aws/aws-sdk-cpp/archive/1.0.47.tar.gz"
|
|
|
|
FILENAME "aws-sdk-cpp-1.0.47.tar.gz"
|
|
|
|
SHA512 ce7471bafe2763f1c382eed8afeaf6422058599a3aa11ae52909da668c45d12827fcd06b9b3ce34e3c2fa33297fd2e09421b8a89833d581efaf62b7108232acf
|
2016-11-28 19:15:42 +08:00
|
|
|
)
|
|
|
|
vcpkg_extract_source_archive(${ARCHIVE})
|
|
|
|
|
|
|
|
vcpkg_apply_patches(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
|
|
PATCHES
|
|
|
|
${CMAKE_CURRENT_LIST_DIR}/drop_git.patch
|
|
|
|
)
|
|
|
|
|
2016-12-07 05:58:04 +08:00
|
|
|
if(VCPKG_CRT_LINKAGE STREQUAL static)
|
2016-11-30 23:06:00 +08:00
|
|
|
set(FORCE_SHARED_CRT OFF)
|
2016-12-01 10:27:27 +08:00
|
|
|
else()
|
|
|
|
set(FORCE_SHARED_CRT ON)
|
2016-11-30 23:03:49 +08:00
|
|
|
endif()
|
|
|
|
|
2016-11-28 19:15:42 +08:00
|
|
|
vcpkg_configure_cmake(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
2016-11-30 23:03:49 +08:00
|
|
|
OPTIONS
|
|
|
|
-DENABLE_TESTING=OFF
|
|
|
|
-DFORCE_SHARED_CRT=${FORCE_SHARED_CRT}
|
2016-11-28 19:15:42 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_install_cmake()
|
|
|
|
|
2016-11-28 23:03:26 +08:00
|
|
|
file(REMOVE_RECURSE
|
|
|
|
${CURRENT_PACKAGES_DIR}/debug/include
|
|
|
|
${CURRENT_PACKAGES_DIR}/lib/cmake
|
|
|
|
${CURRENT_PACKAGES_DIR}/lib/pkgconfig
|
|
|
|
${CURRENT_PACKAGES_DIR}/debug/lib/cmake
|
|
|
|
${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig
|
|
|
|
${CURRENT_PACKAGES_DIR}/nuget
|
|
|
|
${CURRENT_PACKAGES_DIR}/debug/nuget)
|
|
|
|
|
2016-12-07 05:58:04 +08:00
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
2016-11-29 11:04:32 +08:00
|
|
|
file(GLOB LIB_FILES ${CURRENT_PACKAGES_DIR}/bin/*.lib)
|
|
|
|
file(GLOB DEBUG_LIB_FILES ${CURRENT_PACKAGES_DIR}/debug/bin/*.lib)
|
|
|
|
file(COPY ${LIB_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
|
|
|
|
file(COPY ${DEBUG_LIB_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
|
|
|
|
file(REMOVE ${LIB_FILES} ${DEBUG_LIB_FILES})
|
2016-12-01 10:23:35 +08:00
|
|
|
|
|
|
|
vcpkg_apply_patches( #define USE_IMPORT_EXPORT in SDKConfig.h
|
2016-12-01 10:56:43 +08:00
|
|
|
SOURCE_PATH ${CURRENT_PACKAGES_DIR}/include
|
2016-12-01 10:23:35 +08:00
|
|
|
PATCHES
|
2016-12-01 10:56:43 +08:00
|
|
|
${CMAKE_CURRENT_LIST_DIR}/shared_define.patch
|
2016-12-01 10:23:35 +08:00
|
|
|
)
|
2016-11-29 11:04:32 +08:00
|
|
|
endif()
|
2016-11-28 23:03:26 +08:00
|
|
|
|
2016-11-28 19:15:42 +08:00
|
|
|
# Handle copyright
|
|
|
|
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/aws-sdk-cpp RENAME copyright)
|