Description
Confirm by changing [ ] to [x] below to ensure that it's a bug:
- I've gone though Developer Guide and API reference
- I've searched for previous similar issues and didn't find any solution
Describe the bug
In one of the products I work on I'm using the aws-encryption-sdk-c library to encrypt data, which is another library provided by AWS, which depends on the aws-sdk-cpp. Hence, I wrote a CMake file to build both libraries as shared libraries.
However, since a recent release, the aws-c-common is compiled as a static library, ignoring the variable BUILD_SHARED_LIB. This is fine for the compilation of aws-sdk-cpp. But when I try to use it inside aws-encryption-sdk-c, that build fails, with this message
[ 61%] Performing configure step for 'encryption_sdk'
CMake Error at <install_prefix>/aws-c-common/cmake/aws-c-common-config.cmake:8 (include):
include could not find load file:
<install_prefix>/aws-c-common/cmake/shared/aws-c-common-targets.cmake
Call Stack (most recent call first):
CMakeLists.txt:38 (find_package)
I've looked at that file, and the issue is that it uses the variable BUILD_SHARED_LIBS to choose wether to include static/aws-c-common-targets.cmake or shared/aws-c-common-targets.cmake. But now aws-c-common is always built as a static library. Hence, the folder shared
does not exist. Since the compilation of the common c libraries is now independent from the variable BUILD_SHARED_LIBS, then also the config.cmake should be modified accordingly.
SDK version number
1.9.39
Platform/OS/Hardware/Device
CentOS 7.9
To Reproduce (observed behavior)
Steps to reproduce the behavior (please share code)
Expected behavior
A clear and concise description of what you expected to happen.