You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

54 lines
1.5 KiB

1 year ago
1 year ago
1 year ago
1 year ago
12 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
  1. cmake_minimum_required(VERSION 3.10)
  2. project(TransmitDisinfection VERSION 0.1 LANGUAGES CXX)
  3. set(CMAKE_INCLUDE_CURRENT_DIR ON)
  4. set(CMAKE_AUTOUIC ON)
  5. set(CMAKE_AUTOMOC ON)
  6. set(CMAKE_AUTORCC ON)
  7. set(CMAKE_CXX_STANDARD 11)
  8. set(CMAKE_CXX_STANDARD_REQUIRED ON)
  9. set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
  10. find_package(QT NAMES Qt6 Qt5 COMPONENTS Widgets REQUIRED)
  11. find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Widgets SerialPort Charts Concurrent REQUIRED)
  12. include_directories(libxsync/include)
  13. include_directories(src)
  14. include_directories(./)
  15. include_directories(./app_protocols/)
  16. include_directories(libzqt)
  17. add_compile_options(-Wall )
  18. file(GLOB_RECURSE APPSRC #
  19. src/*.cpp #
  20. src/*.c #
  21. src/*.ui #
  22. src/*.h #
  23. src/*.hpp #
  24. )
  25. set(PROJECT_SOURCES
  26. ${APPSRC}
  27. app.rc
  28. )
  29. add_executable(TransmitDisinfection WIN32
  30. ${PROJECT_SOURCES}
  31. )
  32. target_link_options(TransmitDisinfection PRIVATE -static -static-libgcc -static-libstdc++)
  33. target_link_libraries(TransmitDisinfection PRIVATE Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::SerialPort Qt${QT_VERSION_MAJOR}::Charts Qt${QT_VERSION_MAJOR}::Concurrent wsock32)
  34. set_target_properties(TransmitDisinfection PROPERTIES
  35. MACOSX_BUNDLE_GUI_IDENTIFIER my.example.com
  36. MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION}
  37. MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
  38. )
  39. if(QT_VERSION_MAJOR EQUAL 6)
  40. qt_finalize_executable(TransmitDisinfection)
  41. endif()