42 lines
1.1 KiB
CMake
42 lines
1.1 KiB
CMake
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 OtaUpdate.rc
|
|
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()
|