mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:28:10 +00:00

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.
21 lines
672 B
CMake
21 lines
672 B
CMake
serenity_component(
|
|
WebSocket
|
|
TARGETS WebSocketServer
|
|
)
|
|
|
|
compile_ipc(WebSocketServer.ipc WebSocketServerEndpoint.h)
|
|
compile_ipc(WebSocketClient.ipc WebSocketClientEndpoint.h)
|
|
|
|
set(SOURCES
|
|
ConnectionFromClient.cpp
|
|
main.cpp
|
|
WebSocketClientEndpoint.h
|
|
WebSocketServerEndpoint.h
|
|
)
|
|
|
|
# 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)
|