aws / aws-sdk-cpp

AWS SDK for C++
Apache License 2.0
1.98k stars 1.06k forks source link

Update CMAKE_PREFIX_PATH to CMAKE_INSTALL_PREFIX #2716

Closed pr0g closed 1 year ago

pr0g commented 1 year ago

Description of changes

This fixes what I believe is a small mistake/typo in the README.

In the CMake configure command, previously -DCMAKE_PREFIX_PATH was provided which is used to tell CMake where to look for installed libraries (not where to install the library that will be built). For that, you need to use -DCMAKE_INSTALL_PREFIX which I believe it what was intended here.

The flow is usually something like this...

cd aws-sdk-cpp
cmake -B build -DCMAKE_INSTALL_PREFIX=../aws-demo/install -DBUILD_ONLY="s3"
cmake --build build --target install
cd ../aws-demo
cmake -B build -DCMAKE_PREFIX_PATH=install
cmake --build build

There's a chance I've misunderstood and the intention was to find existing libraries, if so please ignore this.

Thanks!

(For reference see the CMake docs CMAKE_PREFIX_PATH and CMAKE_INSTALL_PREFIX.

Check all that applies

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

pr0g commented 1 year ago

Thank you for approving. Is there anything else needed before it can be merged? Thanks!