# Minimal CMakeLists.txt for the AWS SDK for C++.
cmake_minimum_required(VERSION 3.2)

# Build using the C++ standard version 11.
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

# Use shared libraries, which is the default for the AWS C++ SDK build.
option(BUILD_SHARED_LIBS "Build shared libraries" ON)

# "my-example" is just an example value.
project(my-example)

# By default the AWS SDK for C++ is installed into /usr/local.
# You may need to adjust the default include path on some platforms.
# include_directories(/usr/local/include)

# Locate the AWS SDK for C++ package.
# "s3" and "cloudtrail" are just example values.
find_package(AWSSDK REQUIRED COMPONENTS s3 cloudtrail ...)

# The executable name and its sourcefiles.
add_executable(my-example my-example.cpp)

# The libraries used by your executable.
target_link_libraries(my-example ${AWSSDK_LINK_LIBRARIES})

# Minimal CMakeLists.txt for the AWS SDK for C++.
cmake_minimum_required(VERSION 3.2)

# Use shared libraries, which is the default for the AWS C++ SDK build.
option(BUILD_SHARED_LIBS "Build shared libraries" ON)

# "my-example" is just an example value.
project(my-example)

# By default the AWS SDK for C++ is installed into /usr/local.
# You may need to adjust the default include path on some platforms.
# include_directories(/usr/local/include)

# Locate the AWS SDK for C++ package.
# "s3" and "cloudtrail" are just example values.
find_package(AWSSDK REQUIRED COMPONENTS s3 cloudtrail ...)

# The executable name and its sourcefiles.
add_executable(my-example my-example.cpp)

# Build using the C++ standard version 11.
target_compile_features(my-example PUBLIC cxx_std_11)

# The libraries used by your executable.
target_link_libraries(my-example ${AWSSDK_LINK_LIBRARIES})

Use target_compile_features instead of CMAKE_CXX_STANDARD.
Use target_compile_features instead of CMAKE_CXX_STANDARD.
