2020-07-14 08:38:51 +00:00
|
|
|
cmake_minimum_required(VERSION 3.14)
|
2017-09-29 20:17:10 +00:00
|
|
|
project(test_dependent_modules)
|
|
|
|
|
2020-07-14 08:38:51 +00:00
|
|
|
find_package(Qt6Widgets REQUIRED)
|
2017-09-29 20:17:10 +00:00
|
|
|
|
|
|
|
set(CMAKE_AUTOMOC ON)
|
|
|
|
set(CMAKE_AUTOUIC ON)
|
|
|
|
set(CMAKE_AUTORCC ON)
|
|
|
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
|
|
|
|
|
|
|
# make sure CMP0071 warnings cause a test failure
|
|
|
|
set(CMAKE_SUPPRESS_DEVELOPER_ERRORS FALSE CACHE INTERNAL "" FORCE)
|
|
|
|
|
2020-07-14 08:38:51 +00:00
|
|
|
qt_wrap_cpp(moc_files mywidget.h)
|
|
|
|
qt_wrap_ui(ui_files mywidget.ui)
|
|
|
|
qt_add_resources(qrc_files res.qrc)
|
2017-09-29 20:17:10 +00:00
|
|
|
|
|
|
|
add_executable(mywidget
|
|
|
|
# source files
|
|
|
|
mywidget.cpp
|
|
|
|
mywidget.h
|
|
|
|
mywidget.ui
|
|
|
|
res.qrc
|
|
|
|
|
|
|
|
# generated files
|
|
|
|
${moc_files}
|
|
|
|
${ui_files}
|
|
|
|
${qrc_files}
|
|
|
|
)
|
2020-07-14 08:38:51 +00:00
|
|
|
target_link_libraries(mywidget PRIVATE Qt::Widgets)
|