SmartLockerTools/OtaUpdate/CMakeLists.txt

35 lines
910 B
CMake
Raw Permalink 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)
2024-05-21 21:09:55 +08:00
set(PROJECT_SOURCES OtaUpdate.rc
2024-05-17 10:36:23 +08:00
main.cpp
Widget.cpp
Widget.h
)
qt_add_executable(SmartLockerUpdater
MANUAL_FINALIZATION
${PROJECT_SOURCES}
)
target_link_libraries(SmartLockerUpdater
2024-05-23 19:58:36 +08:00
PRIVATE Peripheral
2024-05-17 10:36:23 +08:00
PRIVATE Qt${QT_VERSION_MAJOR}::Widgets
PRIVATE Qt${QT_VERSION_MAJOR}::SerialPort
)
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()