LadybirdBrowser / ancient-history

The Ladybird web browser
BSD 2-Clause "Simplified" License
1.62k stars 105 forks source link

cmake thinks Lagom::WebSocket is an executable? #13

Closed vgel closed 2 years ago

vgel commented 2 years ago

When I try to build with a fresh clone, I get this cmake error:

$ cmake -GNinja -B Build
-- Could NOT find WrapVulkanHeaders (missing: Vulkan_INCLUDE_DIR) 
CMake Error at CMakeLists.txt:43 (target_link_libraries):
  Target "Lagom::WebSocket" of type EXECUTABLE may not be linked into another
  target.  One may link only to INTERFACE, OBJECT, STATIC or SHARED
  libraries, or to executables with the ENABLE_EXPORTS property set.

When I remove Lagom::WebSocket from CMakeLists.txt (and the associated websocket code from WebView, so it will successfully link), I can build and use the browser normally (though presumably without websocket support, if that works normally).

I'm not familiar with cmake-authoring or the Serenity build process, so I'm not sure what's going on here. I tried to dig into the Lagom cmake files but didn't get much traction in 20 minutes of searching around.

ADKaster commented 2 years ago

Oh hmm. We do now have the web socket IPC server and the library with a name collision on export. This isn't a problem for the Serenity build because the library has a target name prefixed with Lib

ADKaster commented 2 years ago

You can use the non-namespaced name LibWebSocket in the target_link_libraries to force it to build until the serenity project fix is in