CMakeLists.txt 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. cmake_minimum_required(VERSION 3.0)
  2. project(openPilotLog 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(QT_MIN_VERSION "5.5.1")
  10. set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DQT_USE_QSTRINGBUILDER")
  11. MESSAGE ("Enabling QStringBuilder")
  12. find_package(QT NAMES Qt6 Qt5 COMPONENTS Widgets REQUIRED)
  13. find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Widgets Sql Network REQUIRED)
  14. set(PROJECT_SOURCES
  15. main.cpp
  16. mainwindow.cpp
  17. src/classes/acurrencyentry.cpp
  18. src/classes/astyle.cpp
  19. src/classes/astandardpaths.cpp
  20. src/classes/aaircraftentry.cpp
  21. src/classes/adownload.cpp
  22. src/classes/aentry.cpp
  23. src/classes/aflightentry.cpp
  24. src/classes/apilotentry.cpp
  25. src/classes/arunguard.cpp
  26. src/classes/asettings.cpp
  27. src/classes/atailentry.cpp
  28. src/database/adatabase.cpp
  29. src/database/adatabasesetup.cpp
  30. src/functions/acalc.cpp
  31. src/functions/alog.cpp
  32. src/functions/areadcsv.cpp
  33. src/functions/astat.cpp
  34. src/gui/dialogues/firstrundialog.cpp
  35. src/gui/dialogues/newflightdialog.cpp
  36. src/gui/dialogues/newpilotdialog.cpp
  37. src/gui/dialogues/newtaildialog.cpp
  38. src/gui/widgets/aircraftwidget.cpp
  39. src/gui/widgets/backupwidget.cpp
  40. src/gui/widgets/debugwidget.cpp
  41. src/gui/widgets/homewidget.cpp
  42. src/gui/widgets/logbookwidget.cpp
  43. src/gui/widgets/pilotswidget.cpp
  44. src/gui/widgets/settingswidget.cpp
  45. src/testing/atimer.cpp
  46. src/opl.h
  47. mainwindow.h
  48. src/classes/acurrencyentry.h
  49. src/classes/astyle.h
  50. src/classes/astandardpaths.h
  51. src/classes/aaircraftentry.h
  52. src/classes/adownload.h
  53. src/classes/aentry.h
  54. src/classes/aflightentry.h
  55. src/classes/apilotentry.h
  56. src/classes/arunguard.h
  57. src/classes/asettings.h
  58. src/classes/atailentry.h
  59. src/database/adatabase.h
  60. src/database/adatabasesetup.h
  61. src/database/adatabasetypes.h
  62. src/functions/acalc.h
  63. src/functions/adatetime.h
  64. src/functions/alog.h
  65. src/functions/areadcsv.h
  66. src/functions/astat.h
  67. src/functions/atime.h
  68. src/gui/dialogues/firstrundialog.h
  69. src/gui/dialogues/newflightdialog.h
  70. src/gui/dialogues/newpilotdialog.h
  71. src/gui/dialogues/newtaildialog.h
  72. src/gui/widgets/aircraftwidget.h
  73. src/gui/widgets/backupwidget.h
  74. src/gui/widgets/debugwidget.h
  75. src/gui/widgets/homewidget.h
  76. src/gui/widgets/logbookwidget.h
  77. src/gui/widgets/pilotswidget.h
  78. src/gui/widgets/settingswidget.h
  79. src/testing/atimer.h
  80. mainwindow.ui
  81. src/gui/dialogues/firstrundialog.ui
  82. src/gui/dialogues/newflight.ui
  83. src/gui/dialogues/newpilot.ui
  84. src/gui/dialogues/newtail.ui
  85. src/gui/widgets/aircraftwidget.ui
  86. src/gui/widgets/backupwidget.ui
  87. src/gui/widgets/debugwidget.ui
  88. src/gui/widgets/homewidget.ui
  89. src/gui/widgets/logbookwidget.ui
  90. src/gui/widgets/pilotswidget.ui
  91. src/gui/widgets/settingswidget.ui
  92. assets/icons.qrc
  93. assets/themes/stylesheets/breeze/breeze.qrc
  94. assets/themes/stylesheets/qdarkstyle/qdarkstyle.qrc
  95. assets/templates.qrc
  96. )
  97. if(${QT_VERSION_MAJOR} GREATER_EQUAL 6)
  98. qt_add_executable(openPilotLog
  99. ${PROJECT_SOURCES}
  100. )
  101. else()
  102. add_executable(openPilotLog
  103. ${PROJECT_SOURCES}
  104. )
  105. endif()
  106. target_link_libraries(openPilotLog PRIVATE Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::Sql Qt${QT_VERSION_MAJOR}::Network)
  107. install(TARGETS openPilotLog DESTINATION bin)