[Libwebsockets] lwsws and plugins on master

Andy Green andy at warmcat.com
Wed Apr 6 20:37:14 CEST 2016



On 04/07/2016 12:30 AM, Denis Osvald wrote:
> Hi,
>
> On 04/06/2016 01:48 PM, Andy Green wrote:
>>
>> 1) When the plugins are linked, they link against the library .a... this
>> bloats the plugins with a copy of the library needlessly.  Can anyone
>> see what I am doing wrong in cmake?
>
> Try https://github.com/warmcat/libwebsockets/pull/487
>
> change enclosed here for conevenience:
>
> diff --git a/CMakeLists.txt b/CMakeLists.txt
> index d12af4d..924778b 100644
> --- a/CMakeLists.txt
> +++ b/CMakeLists.txt
> @@ -1154,8 +1154,8 @@ if (NOT LWS_WITHOUT_TESTAPPS)
>                  source_group("Sources"   FILES ${PLUGIN_SRCS})
>                  add_library(${PLUGIN_NAME} SHARED ${PLUGIN_SRCS} ${PLUGIN_HDR})
>
> -               target_link_libraries(${PLUGIN_NAME} websockets)
> -               add_dependencies(${PLUGIN_NAME} websockets)
> +               target_link_libraries(${PLUGIN_NAME} websockets_shared)

Thanks a lot... that has reduced them to the expected size.

-Andy

> +               add_dependencies(${PLUGIN_NAME} websockets_shared)
>
>                  # Set test app specific defines.
>                  set_property(TARGET ${PLUGIN_NAME}
> @@ -1385,7 +1385,7 @@ endif()
>
>   if (LWS_WITH_PLUGINS)
>          install(TARGETS ${PLUGINS_LIST}
> -               PERMISSIONS  OWNER_EXECUTE GROUP_EXECUTE WORLD_EXECUTE OWNER_READ GROUP_READ WORLD_READ
> +               PERMISSIONS  OWNER_WRITE OWNER_EXECUTE GROUP_EXECUTE WORLD_EXECUTE OWNER_READ GROUP_READ WORLD_READ
>                  DESTINATION share/libwebsockets-test-server/plugins
>                  COMPONENT plugins)
>   endif()
>



More information about the Libwebsockets mailing list