diff --git a/ports/aws-sdk-cpp/portfile.cmake b/ports/aws-sdk-cpp/portfile.cmake index f012719a88..5ff1ba6b75 100644 --- a/ports/aws-sdk-cpp/portfile.cmake +++ b/ports/aws-sdk-cpp/portfile.cmake @@ -41,6 +41,12 @@ if(${VCPKG_LIBRARY_LINKAGE} STREQUAL dynamic) 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}) + + vcpkg_apply_patches( #define USE_IMPORT_EXPORT in SDKConfig.h + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CURRENT_PACKAGES_DIR}/include/shared_define.patch + ) endif() # Handle copyright diff --git a/ports/aws-sdk-cpp/shared_define.patch b/ports/aws-sdk-cpp/shared_define.patch new file mode 100644 index 0000000000..96657b33ea --- /dev/null +++ b/ports/aws-sdk-cpp/shared_define.patch @@ -0,0 +1,10 @@ +diff --git a/aws/core/SDKConfig.h b/aws/core/SDKConfig.h +index 130c9dd..66b2630 100644 +--- a/aws/core/SDKConfig.h ++++ b/aws/core/SDKConfig.h +@@ -17,3 +17,4 @@ + + #define JSON_USE_EXCEPTION 0 + ++#define USE_IMPORT_EXPORT +\ No newline at end of file