summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Kaster <akaster@serenityos.org>2022-07-07 08:39:56 -0600
committerLinus Groh <mail@linusgroh.de>2022-07-07 16:50:05 +0200
commitb1b61c902d7b6c309e71e22163bfa393844e4bd5 (patch)
treeb182f633ec30d374c36605db2b840a1dd87d85bd
parent7fbc3548291063757b76e8122343610c27284d3f (diff)
downloadserenity-b1b61c902d7b6c309e71e22163bfa393844e4bd5.zip
WebSocket: Change target name to deconflict with LibWebSocket on Lagom
When compiling with Lagom, we give both LibWebSocket and the WebSocket IPC service the Lagom:: prefix as an alias, but strip the Lib from all library target names before applying the prefix. This creates a conflict when external projects used the aliased name between the server and the library. Give WebSocket a name that deconflicts it, but keep the binary name the same, /bin/WebSocket.
-rw-r--r--Userland/Services/WebSocket/CMakeLists.txt10
1 files changed, 7 insertions, 3 deletions
diff --git a/Userland/Services/WebSocket/CMakeLists.txt b/Userland/Services/WebSocket/CMakeLists.txt
index 21e7039bf0..ccff113db9 100644
--- a/Userland/Services/WebSocket/CMakeLists.txt
+++ b/Userland/Services/WebSocket/CMakeLists.txt
@@ -1,6 +1,6 @@
serenity_component(
WebSocket
- TARGETS WebSocket
+ TARGETS WebSocketServer
)
compile_ipc(WebSocketServer.ipc WebSocketServerEndpoint.h)
@@ -13,5 +13,9 @@ set(SOURCES
WebSocketServerEndpoint.h
)
-serenity_bin(WebSocket)
-target_link_libraries(WebSocket LibCore LibIPC LibWebSocket LibMain)
+# Note: We use a target name of WebSocketServer here to deconflict with the
+# Lagom namespaced target name for LibWebSocket, Lagom::WebSocket.
+# The server binary name is still WebSocket.
+serenity_bin(WebSocketServer)
+set_target_properties(WebSocketServer PROPERTIES OUTPUT_NAME WebSocket)
+target_link_libraries(WebSocketServer LibCore LibIPC LibWebSocket LibMain)