SmartLockerTools/OtaUpdate/CMakeLists.txt

43 lines
1.1 KiB
CMake
Raw Normal View History

2024-11-21 09:31:41 +08:00
set(APPLICATION_NAME "掌静脉升级工具")
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-11-21 09:31:41 +08:00
configure_file(Configuration.h.in Configuration.h)
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}
)
2024-11-21 09:31:41 +08:00
target_include_directories(SmartLockerUpdater
PRIVATE ${CMAKE_CURRENT_BINARY_DIR}
)
2024-05-17 10:36:23 +08:00
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()