CMakeLists.txt.xIkHXX 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. cmake_minimum_required(VERSION 3.16)
  2. project(Cabinet VERSION 0.1 LANGUAGES CXX)
  3. set(CMAKE_AUTOMOC ON)
  4. set(CMAKE_CXX_STANDARD_REQUIRED ON)
  5. set(CMAKE_AUTORCC ON)
  6. find_package(Qt6 6.7 COMPONENTS Quick Network SerialPort Multimedia Pdf REQUIRED)
  7. find_package(Qt6 REQUIRED COMPONENTS Core)
  8. find_package(Qt6 REQUIRED COMPONENTS Core)
  9. find_package(Qt6 REQUIRED COMPONENTS Core)
  10. find_package(Qt6 REQUIRED COMPONENTS Core)
  11. # 查找静态库
  12. find_library(ZKFP_LIB
  13. NAMES zkfp libzkfp
  14. PATHS libs/x64lib
  15. NO_DEFAULT_PATH
  16. )
  17. # 查找虹软SDK
  18. find_library(ARCSOFT_FACE_LIB
  19. NAMES libarcsoft_face_engine
  20. PATHS sdk/hrsdk/lib/X64
  21. NO_DEFAULT_PATH
  22. )
  23. set(APP_ICON_WINDOWS "${CMAKE_CURRENT_SOURCE_DIR}/logo.rc")
  24. qt_add_executable(appCabinet
  25. main.cpp resource.qrc ${RESOURCES} ${APP_ICON_WINDOWS}
  26. )
  27. qt_add_qml_module(appCabinet
  28. URI Cabinet
  29. VERSION 1.0
  30. QML_FILES main.qml
  31. RESOURCES resource.qrc
  32. QML_FILES content/Login.qml content/MainScreen.qml
  33. SOURCES user/config.cpp
  34. SOURCES user/config.h user/define.h
  35. SOURCES
  36. SOURCES user/lock.h user/lock.cpp
  37. SOURCES user/httpclient.cpp user/httpclient.h
  38. SOURCES user/rfid.h user/rfid.cpp
  39. SOURCES user/ModuleReader.h
  40. SOURCES user/pro.cpp user/pro.h
  41. QML_FILES content/MaterialSelModel.qml
  42. QML_FILES content/MaterialTakeBack.qml
  43. QML_FILES content/MaterialStatistics.qml
  44. QML_FILES content/MaterialInstructions.qml
  45. QML_FILES content/MaterialCheckPlan.qml
  46. QML_FILES content/MaterialCheckForm.qml
  47. SOURCES
  48. SOURCES user/finger.h user/finger.cpp
  49. SOURCES user/logoutput.cpp user/logoutput.h
  50. QML_FILES content/SetView.qml
  51. SOURCES libs/include/libzkfp.h libs/include/libzkfperrdef.h libs/include/libzkfptype.h libs/include/zkinterface.h
  52. RESOURCES logo.rc
  53. QML_FILES content/MaterialCheckSign.qml
  54. QML_FILES
  55. QML_FILES content/PromptInfo.qml
  56. QML_FILES content/MaterialReplace.qml
  57. QML_FILES content/ReuseTextField.qml
  58. QML_FILES content/ReuseComboBox.qml
  59. QML_FILES content/ReuseDateField.qml
  60. SOURCES sdk/hrsdk/inc/amcomdef.h sdk/hrsdk/inc/arcsoft_face_sdk.h sdk/hrsdk/inc/asvloffscreen.h sdk/hrsdk/inc/merror.h
  61. SOURCES Interactive/template_singleton.h
  62. SOURCES Interactive/InteractiveCore.cpp Interactive/InteractiveCore.h
  63. SOURCES Interactive/InteractiveData.cpp Interactive/InteractiveData.h
  64. SOURCES Interactive/InteractiveTask.cpp Interactive/InteractiveTask.h
  65. SOURCES Interactive/InteractiveWork.cpp Interactive/InteractiveWork.h
  66. SOURCES Interactive/InteractiveListModel.cpp Interactive/InteractiveListModel.h
  67. SOURCES Interactive/RunAbstract.cpp Interactive/RunAbstract.h
  68. SOURCES Interactive/RunDataCacheRefresh.h Interactive/RunDataCacheRefresh.cpp
  69. SOURCES Interactive/RunHttpGetMaterialInfoList.cpp Interactive/RunHttpGetMaterialInfoList.h
  70. SOURCES Interactive/RunMaterialReplaceRefreshListModel.h Interactive/RunMaterialReplaceRefreshListModel.cpp
  71. SOURCES Interactive/RunMaterialManualReplaceRefreshListModel.h Interactive/RunMaterialManualReplaceRefreshListModel.cpp
  72. SOURCES Interactive/RunMaterialManualReplaceSubmit.h Interactive/RunMaterialManualReplaceSubmit.cpp
  73. QML_FILES content/MaterialReplaceHand.qml
  74. QML_FILES content/MaterialReplaceAuto.qml
  75. QML_FILES content/MaterialException.qml
  76. QML_FILES content/ReuseMaterialInfo.qml
  77. QML_FILES content/MaterialExceptionReport.qml
  78. QML_FILES content/MaterialExceptionUpdate.qml
  79. SOURCES Interactive/RunHttpGetIsMaterialsPropertyValuePage.h Interactive/RunHttpGetIsMaterialsPropertyValuePage.cpp
  80. SOURCES Interactive/RunMaterialExceptionReport.h Interactive/RunMaterialExceptionReport.cpp
  81. SOURCES Interactive/RunMaterialExceptionRefreshListModel.h Interactive/RunMaterialExceptionRefreshListModel.cpp
  82. QML_FILES content/MaterialExceptionFinish.qml
  83. SOURCES user/timeout.h user/timeout.cpp
  84. QML_FILES content/MaterialDialog.qml
  85. SOURCES Interactive/RunHttpGet_getIsMaterialsLoanExceptionPage.h Interactive/RunHttpGet_getIsMaterialsLoanExceptionPage.cpp
  86. QML_FILES content/MaterialDialogMisplace.qml
  87. QML_FILES content/MaterialDialogTake.qml
  88. QML_FILES content/MaterialDialogBack.qml
  89. SOURCES
  90. SOURCES
  91. SOURCES Interactive/InteractiveFace.h Interactive/InteractiveFace.cpp
  92. QML_FILES
  93. QML_FILES content/FacialRecognition.qml
  94. SOURCES Interactive/InteractiveHttp.h Interactive/InteractiveHttp.cpp
  95. SOURCES Interactive/RunHttpGet_getSysUserCharacteristicPage.h Interactive/RunHttpGet_getSysUserCharacteristicPage.cpp
  96. )
  97. # Qt for iOS sets MACOSX_BUNDLE_GUI_IDENTIFIER automatically since Qt 6.1.
  98. # If you are developing for iOS or macOS you should consider setting an
  99. # explicit, fixed bundle identifier manually though.
  100. set_target_properties(appCabinet PROPERTIES
  101. # MACOSX_BUNDLE_GUI_IDENTIFIER com.example.appCabinet
  102. MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION}
  103. MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
  104. MACOSX_BUNDLE TRUE
  105. WIN32_EXECUTABLE TRUE
  106. )
  107. # add_subdirectory(MediaPlayer)
  108. # add_subdirectory(MediaControls)
  109. # 链接静态库
  110. target_link_libraries(appCabinet PRIVATE ${ZKFP_LIB} ${ARCSOFT_FACE_LIB})
  111. target_link_libraries(appCabinet
  112. PRIVATE Qt6::Quick
  113. Qt6::Network
  114. Qt6::SerialPort
  115. Qt6::Multimedia
  116. Qt6::Pdf
  117. )
  118. target_link_libraries(appCabinet PRIVATE Qt6::Core)
  119. target_link_libraries(appCabinet PRIVATE Qt6::Core)
  120. target_link_libraries(appCabinet PRIVATE Qt6::Core)
  121. target_link_libraries(appCabinet PRIVATE Qt6::Core)
  122. include(GNUInstallDirs)
  123. install(TARGETS appCabinet
  124. BUNDLE DESTINATION .
  125. LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
  126. RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
  127. )