mirror of
https://github.com/x-tools-author/x-tools.git
synced 2025-09-15 15:28:40 +08:00
14 lines
540 B
CMake
14 lines
540 B
CMake
find_package(Qt${QT_VERSION_MAJOR} QUIET COMPONENTS WebSockets)
|
|
if(Qt${QT_VERSION_MAJOR}WebSockets_FOUND)
|
|
add_compile_definitions(X_ENABLE_WEBSOCKETS)
|
|
list(APPEND X_LIBS Qt${QT_VERSION_MAJOR}::WebSockets)
|
|
else()
|
|
message(STATUS "WebSockets module is disable, WebSockets files will be removed.")
|
|
|
|
file(GLOB_RECURSE SERIAL_PORT_FILES "${CMAKE_CURRENT_SOURCE_DIR}/src/websocket*")
|
|
foreach(file ${SERIAL_PORT_FILES})
|
|
list(REMOVE_ITEM X_SOURCES ${file})
|
|
message(STATUS "[WebSockets]Remove file: ${file}")
|
|
endforeach()
|
|
endif()
|