Closed thalesx closed 3 years ago
Hi @thalesx thanks for the feedback. Would this solve it? https://github.com/Azure/azure-c-shared-utility/pull/531
FWIW this is what I see on the install step after the change:
Yes! That solves it.
Reverting fix due to vcpkg build break, reopening issue.
Per the cmake like below, the SDK's C headers get installed under
/usr/include/azureiot/azure_c_shared_utility
.https://github.com/Azure/azure-c-shared-utility/blob/341c40b8ce15d2372d9407ef537b0abe45c452d4/CMakeLists.txt#L692
However, many of the SDK's headers include other SDK headers using (1)
#include "azure_c_shared_utility/other_header.h"
instead of (2)#include "azureiot/azure_c_shared_utility/other_header.h"
.The issue is that, for a project consuming the C SDK in the form of a lib installed in the sysroot, only the
/usr/include
is in the include search path by default; the directory/usr/include/azureiot
is not. Therefore, the header includes of the form (1) fail.By patching the c-utility CMakeList.txt to install the headers in
${CMAKE_INSTALL_INCLUDEDIR}/azure_c_shared_utility
, I got it to work for my project. Alternatively the includes of form (1) could be changed to (2).