First clone the repository vcpkg from GitHub.
git clone https://github.com/microsoft/vcpkg/
Then cd into the vcpkg folder that has been created.
cd vcpkg
Perform first time installation by executing bootstrap-vcpkg.bat (add -disableMetrics to avoid some Microsoft “spoofing”)
bootstrap-vcpkg.bat -disableMetrics
Search for the library that you want.
vcpkg search aws
Among the different results, select the one you want to install by package[subpacke1,subpackage2]:platform. The following example will install aws-sdk-cpp the core and its dependencies.
vcpkg install aws-sdk-cpp[core]:x64-windows
The rusult of that command is:
vcpkg install aws-sdk-cpp[core]:x64-windows
Computing installation plan...
The following packages will be built and installed:
* aws-c-common[core]:x64-windows -> 0.4.56
* aws-c-event-stream[core]:x64-windows -> 0.1.6
* aws-checksums[core]:x64-windows -> 0.1.9
aws-sdk-cpp[core]:x64-windows -> 1.8.126#7
* zlib[core]:x64-windows -> 1.2.11#9
Additional packages (*) will be modified to complete this operation.
Detecting compiler hash for triplet x64-windows...
A suitable version of powershell-core was not found (required v7.1.0). Downloading portable powershell-core v7.1.0...
Downloading powershell-core...
https://github.com/PowerShell/PowerShell/releases/download/v7.1.0/PowerShell-7.1.0-win-x86.zip -> B:\vcpkg\downloads\PowerShell-7.1.0-win-x86.zip
Extracting powershell-core...
A suitable version of 7zip was not found (required v18.1.0). Downloading portable 7zip v18.1.0...
Downloading 7zip...
https://www.nuget.org/api/v2/package/7-Zip.CommandLine/18.1.0 -> B:\vcpkg\downloads\7-zip.commandline.18.1.0.nupkg
Extracting 7zip...
A suitable version of nuget was not found (required v5.5.1). Downloading portable nuget v5.5.1...
Downloading nuget...
https://dist.nuget.org/win-x86-commandline/v5.5.1/nuget.exe -> B:\vcpkg\downloads\22ea847d-nuget.exe
Using cached binary package: C:\Users\BionicApe\AppData\Local\vcpkg\archives\3b\3bd615629bf5074c2dda04f63220ba3579302d8a.zip
Using cached binary package: C:\Users\BionicApe\AppData\Local\vcpkg\archives\f1\f196b8ad77a742413dde0f01ca78a77d693eebd3.zip
Using cached binary package: C:\Users\BionicApe\AppData\Local\vcpkg\archives\58\5874cce2c72fa7630d6e2b4bad172db4b94d1450.zip
Using cached binary package: C:\Users\BionicApe\AppData\Local\vcpkg\archives\52\5222c27b10ad25a2f01d772d12268a5f2ca74e93.zip
Using cached binary package: C:\Users\BionicApe\AppData\Local\vcpkg\archives\68\6830c535a03dbe95c43e070c9dfba3ec1c9ab5b4.zip
Starting package 1/5: aws-c-common:x64-windows
Building package aws-c-common[core]:x64-windows...
Building package aws-c-common[core]:x64-windows... done
Installing package aws-c-common[core]:x64-windows...
Installing package aws-c-common[core]:x64-windows... done
Elapsed time for package aws-c-common:x64-windows: 546.8 ms
Starting package 2/5: aws-checksums:x64-windows
Building package aws-checksums[core]:x64-windows...
Building package aws-checksums[core]:x64-windows... done
Installing package aws-checksums[core]:x64-windows...
Installing package aws-checksums[core]:x64-windows... done
Elapsed time for package aws-checksums:x64-windows: 95.37 ms
Starting package 3/5: aws-c-event-stream:x64-windows
Building package aws-c-event-stream[core]:x64-windows...
Building package aws-c-event-stream[core]:x64-windows... done
Installing package aws-c-event-stream[core]:x64-windows...
Installing package aws-c-event-stream[core]:x64-windows... done
Elapsed time for package aws-c-event-stream:x64-windows: 112.3 ms
Starting package 4/5: zlib:x64-windows
Building package zlib[core]:x64-windows...
Building package zlib[core]:x64-windows... done
Installing package zlib[core]:x64-windows...
Installing package zlib[core]:x64-windows... done
Elapsed time for package zlib:x64-windows: 93.36 ms
Starting package 5/5: aws-sdk-cpp:x64-windows
Building package aws-sdk-cpp[core]:x64-windows...
Building package aws-sdk-cpp[core]:x64-windows... done
Installing package aws-sdk-cpp[core]:x64-windows...
Installing package aws-sdk-cpp[core]:x64-windows... done
Elapsed time for package aws-sdk-cpp:x64-windows: 846 ms
Total elapsed time: 17.84 s
The package aws-sdk-cpp:x64-windows provides CMake targets:
find_package(AWSSDK CONFIG COMPONENTS core dynamodb kinesis s3 REQUIRED)
target_include_directories(main PRIVATE ${AWSSDK_INCLUDE_DIRS})
target_link_libraries(main PRIVATE ${AWSSDK_LIBRARIES})
Now, export and copy the results to your project: