title: How to link aws-sdk-cpp with CMake?
body: <p>I have found that Amazon has a SDK in C++ (<a href="https://github.com/awslabs/aws-sdk-cpp" rel="nofollow">github link</a>), but I cannot get to link it via CMake...</p>
  
  <p>I have done the steps in the readme:</p>
  
  <pre><code>mkdir BUILD_DIR
  cd BUILD_DIR
  cmake -DCMAKE_BUILD_TYPE=Release ..
  make
  sudo make install
  </code></pre>
  
  <p>but what is the way to link it via CMake?</p>
  
  <p>I have tried <code>find_package(aws-cpp-sdk)</code>, but it does not find it. Any help please? :)</p>
  
  <hr>
  
  <p>Ok, in the end I have found a way to do it:</p>
  
  <pre><code>set(AWS_CPP_SDK_INCLUDE_DIRS /path/to/include/aws CACHE STRING "aws-cpp-sdk include directories")
  set(AWS_CPP_SDK_CORE_LIB "-l:/path/to/libaws-cpp-sdk-core.so" CACHE STRING "aws-cpp-sdk link core lib")
  set(AWS_CPP_SDK_S3_LIB "-l:/path/to/libaws-cpp-sdk-s3.so" CACHE STRING "aws-cpp-sdk link S3 lib")
  </code></pre>
  
  <p>And then use the variables for linking</p>
  
  <p>Thanks @Tsyvarev for the help, it gave me this idea</p>
  
  <p>But the problem is that it say that it don't find the aws-cpp-sdk-core.so at execution time:</p>
  
  <pre><code>error while loading shared libraries: libaws-cpp-sdk-core.so: cannot open shared object file: No such file or directory
  </code></pre>