[Libwebsockets] suggestion: Add include/libsockets.h link to build directory

Andy Green andy at warmcat.com
Tue Feb 28 01:35:18 CET 2017



On February 28, 2017 9:20:57 AM GMT+09:00, Per Bothner <per at bothner.com> wrote:
>On 02/27/2017 04:00 PM, Andy Green wrote:
>>>> Using -I${with_libwebsockets}/include does seem more elegant
>though.
>
>> This can't be done in the source tree directly because we use
>lws_config.h that is created by cmake.
>>
>> So I added a patch on CMakeLists.txt that creates ./include-ext/ in
>the build dir, with libwebsockets.h and lws_config copied in there by
>lws make action.
>
>Using "./include-ext" works.
>But why create "./include-ext" rather than "./include"?
>Using ./include has the advantage that the relative file layout of the
>build
>directory matches the layout in the install directory (at least in
>simple cases),
>means means applications can use the same logic for both cases.
>
>It's not a bit deal - using ./include-ext" should work for me.
>I just think using ./include is more natural and potentially more
>useful.

I just converted the hack I did for ESP32 to CMake without giving it any further thought.

There's no reason not to use ./build/include afaics, I updated the patch to do that instead.

-Andy



More information about the Libwebsockets mailing list