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.

58 lines
1.7 KiB

2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
1 year ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
  1. cmake_minimum_required(VERSION 3.5)
  2. project(electrocardiograph_upper 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 PrintSupport SerialPort Charts Concurrent REQUIRED)
  12. include_directories(libxsync/include)
  13. include_directories(src)
  14. include_directories(./)
  15. include_directories(libzqt)
  16. add_compile_options(-Wall )
  17. set(PROJECT_SOURCES
  18. libzqt/logger.cpp
  19. libzqt/zqthread.cpp
  20. libzqt/QFunction.cpp
  21. src/main.cpp
  22. mainwindow.cpp
  23. mainwindow.h
  24. mainwindow.ui
  25. src/qt_serial_datachannel.cpp
  26. src/electrocardiograph_tester.cpp
  27. libzqt/widgetplot2d.cpp
  28. libzqt/widgetplot2d.ui
  29. libzqt/qcustomplot.cpp
  30. )
  31. add_executable(electrocardiograph_upper WIN32
  32. ${PROJECT_SOURCES}
  33. )
  34. target_link_options(electrocardiograph_upper PRIVATE -static -static-libgcc -static-libstdc++)
  35. target_link_libraries(electrocardiograph_upper PRIVATE Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::PrintSupport Qt${QT_VERSION_MAJOR}::SerialPort Qt${QT_VERSION_MAJOR}::Charts Qt${QT_VERSION_MAJOR}::Concurrent wsock32)
  36. set_target_properties(electrocardiograph_upper PROPERTIES
  37. MACOSX_BUNDLE_GUI_IDENTIFIER my.example.com
  38. MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION}
  39. MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
  40. )
  41. if(QT_VERSION_MAJOR EQUAL 6)
  42. qt_finalize_executable(electrocardiograph_upper)
  43. endif()