SmartLockerTools/OtaUpdate/CMakeLists.txt

42 lines
1.1 KiB
CMake
Raw Normal View History

2024-05-17 10:36:23 +08:00
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Widgets SerialPort)
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Widgets SerialPort)
set(PROJECT_SOURCES
main.cpp
CdcUpdater.h CdcUpdater.cpp
DeviceDiscovery.h DeviceDiscovery.cpp
Widget.cpp
Widget.h
)
qt_add_executable(SmartLockerUpdater
MANUAL_FINALIZATION
${PROJECT_SOURCES}
)
target_link_libraries(SmartLockerUpdater
PRIVATE Universal
PRIVATE Encrypt
PRIVATE mfplat
PRIVATE mfuuid
PRIVATE Mfreadwrite
PRIVATE Qt${QT_VERSION_MAJOR}::Widgets
PRIVATE Qt${QT_VERSION_MAJOR}::SerialPort
PRIVATE Mf
)
set_target_properties(SmartLockerUpdater PROPERTIES
${BUNDLE_ID_OPTION}
MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION}
MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
MACOSX_BUNDLE TRUE
WIN32_EXECUTABLE TRUE
)
if(QT_VERSION_MAJOR EQUAL 6)
qt_finalize_executable(SmartLockerUpdater)
endif()