80 lines
2.2 KiB
CMake
80 lines
2.2 KiB
CMake
project(Analyser VERSION 0.3 LANGUAGES C CXX)
|
|
set(APPLICATION_NAME "掌静脉测试工具")
|
|
|
|
find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Quick QuickTemplates2 SerialPort JpegPrivate BundledLibjpeg)
|
|
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Quick QuickTemplates2 SerialPort JpegPrivate BundledLibjpeg)
|
|
|
|
qt_standard_project_setup(REQUIRES 6.5)
|
|
|
|
configure_file(Configuration.h.in Configuration.h)
|
|
|
|
add_executable(Analyser Analyser.rc
|
|
main.cpp
|
|
Application.h Application.cpp
|
|
CategoryLogSinkBackend.h CategoryLogSinkBackend.cpp
|
|
ImageDecoder.h ImageDecoder.cpp
|
|
ModuleCommunication.h ModuleCommunication.cpp
|
|
PalmFeatureTableModel.h PalmFeatureTableModel.cpp
|
|
VideoFrameProvider.h VideoFrameProvider.cpp
|
|
VideoPlayer.h VideoPlayer.cpp
|
|
)
|
|
|
|
qt_add_qml_module(Analyser
|
|
URI Analyser
|
|
VERSION 1.0
|
|
QML_FILES
|
|
qml/Main.qml
|
|
qml/ConnectionItem.qml
|
|
qml/OperationItem.qml
|
|
qml/OtaPage.qml
|
|
qml/EnrollVerifyOperations.qml
|
|
qml/ExtendedOperations.qml
|
|
RESOURCES
|
|
resources/successfull.svg
|
|
resources/warning.svg
|
|
resources/palm-middle.png
|
|
)
|
|
|
|
target_compile_definitions(Analyser
|
|
PRIVATE _CRT_SECURE_NO_WARNINGS
|
|
)
|
|
|
|
if(UNIX)
|
|
set_target_properties(Analyser PROPERTIES
|
|
SUFFIX .AppImage
|
|
)
|
|
endif()
|
|
if(CMAKE_BUILD_TYPE STREQUAL "Release")
|
|
set_property(TARGET Analyser PROPERTY
|
|
WIN32_EXECUTABLE true
|
|
)
|
|
endif()
|
|
|
|
target_include_directories(Analyser
|
|
PRIVATE ${FFmpeg_INCLUDE_DIR}
|
|
PRIVATE ${CMAKE_CURRENT_BINARY_DIR}
|
|
)
|
|
|
|
target_link_directories(Analyser
|
|
PRIVATE ${FFmpeg_LIB_DIR}
|
|
)
|
|
|
|
target_link_libraries(Analyser
|
|
PRIVATE Fluent
|
|
PRIVATE Fluentplugin
|
|
PRIVATE Encrypt
|
|
PRIVATE Database
|
|
PRIVATE Peripheral
|
|
PRIVATE avcodec
|
|
PRIVATE swscale
|
|
PRIVATE avutil
|
|
PRIVATE avdevice
|
|
PRIVATE avformat
|
|
$<$<PLATFORM_ID:Windows>:Ws2_32>
|
|
PRIVATE Qt${QT_VERSION_MAJOR}::Quick
|
|
PRIVATE Qt${QT_VERSION_MAJOR}::QuickTemplates2
|
|
PRIVATE Qt${QT_VERSION_MAJOR}::SerialPort
|
|
PRIVATE Qt${QT_VERSION_MAJOR}::JpegPrivate
|
|
PRIVATE Qt${QT_VERSION_MAJOR}::BundledLibjpeg
|
|
)
|