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