std_reg/CMakeLists.txt

29 lines
567 B
CMake
Raw Normal View History

2025-02-27 17:00:55 +08:00
cmake_minimum_required(VERSION 3.16)
project(std_reg LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
if (MSVC)
add_compile_options(/utf-8)
endif()
find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Widgets)
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Widgets)
add_executable(std_reg
main.cpp
mainwindow.cpp
mainwindow.h
mainwindow.ui
)
target_link_libraries(std_reg PRIVATE Qt${QT_VERSION_MAJOR}::Widgets)