file(GLOB_RECURSE SOURCE_H "${CMAKE_SOURCE_DIR}/Source/ModbusStudio/*.h")
file(GLOB_RECURSE SOURCE_UI "${CMAKE_SOURCE_DIR}/Source/ModbusStudio/*.ui")
file(GLOB_RECURSE SOURCE_CPP "${CMAKE_SOURCE_DIR}/Source/ModbusStudio/*.cpp")

list(APPEND ALL_SOURCE ${SOURCE_H})
list(APPEND ALL_SOURCE ${SOURCE_UI})
list(APPEND ALL_SOURCE ${SOURCE_CPP})
list(APPEND ALL_SOURCE ${CMAKE_SOURCE_DIR}/Source/Common/Common/xToolsSettings.h)
list(APPEND ALL_SOURCE ${CMAKE_SOURCE_DIR}/Source/Common/Common/xToolsSettings.cpp)
list(APPEND ALL_SOURCE ${CMAKE_SOURCE_DIR}/Source/Common/Common/xToolsInterface.h)
list(APPEND ALL_SOURCE ${CMAKE_SOURCE_DIR}/Source/Common/Common/xToolsInterface.cpp)
list(APPEND ALL_SOURCE ${CMAKE_SOURCE_DIR}/Source/Common/Common/xToolsTranslator.h)
list(APPEND ALL_SOURCE ${CMAKE_SOURCE_DIR}/Source/Common/Common/xToolsTranslator.cpp)
list(APPEND ALL_SOURCE ${CMAKE_SOURCE_DIR}/Source/Common/CommonUI/xToolsUi.h)
list(APPEND ALL_SOURCE ${CMAKE_SOURCE_DIR}/Source/Common/CommonUI/xToolsMainWindow.h)
list(APPEND ALL_SOURCE ${CMAKE_SOURCE_DIR}/Source/Common/CommonUI/xToolsMainWindow.cpp)
list(APPEND ALL_SOURCE ${CMAKE_SOURCE_DIR}/xTools.qrc)

x_tools_add_executable("ModbusStudio" ${ALL_SOURCE})
x_tools_set_target_properties(ModbusStudio)
x_tools_deploy_qt(ModbusStudio)

target_link_libraries(ModbusStudio PRIVATE glog::glog)
target_link_libraries(ModbusStudio PRIVATE Qt${QT_VERSION_MAJOR}::Widgets)
target_link_libraries(ModbusStudio PRIVATE Qt${QT_VERSION_MAJOR}::Network)
target_link_libraries(ModbusStudio PRIVATE Qt${QT_VERSION_MAJOR}::SerialBus)
target_link_libraries(ModbusStudio PRIVATE Qt${QT_VERSION_MAJOR}::SerialPort)
