[Libwebsockets] lwsws and plugins on master

Denis Osvald denis.osvald at sartura.hr
Wed Apr 6 18:30:12 CEST 2016


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)
+               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()
-- 

Permission change was needed so make install would pass
(rpath change on '.so' of plugin)


Regards,
Denis Osvald



More information about the Libwebsockets mailing list