b71b7461b0
Make sure we don't run into warnings for CMake 3.10 Task-number: QTBUG-63442 Change-Id: Ida004705646f0c32fb4bf6006036d80b1f279fd7 Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Sebastian Holtermann <sebholt@xwmw.org> Reviewed-by: Rolf Eike Beer <eb@emlix.com>
31 lines
664 B
CMake
31 lines
664 B
CMake
cmake_minimum_required(VERSION 2.8)
|
|
project(test_dependent_modules)
|
|
|
|
find_package(Qt5Widgets REQUIRED)
|
|
|
|
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)
|
|
|
|
qt5_wrap_cpp(moc_files mywidget.h)
|
|
qt5_wrap_ui(ui_files mywidget.ui)
|
|
qt5_add_resources(qrc_files res.qrc)
|
|
|
|
add_executable(mywidget
|
|
# source files
|
|
mywidget.cpp
|
|
mywidget.h
|
|
mywidget.ui
|
|
res.qrc
|
|
|
|
# generated files
|
|
${moc_files}
|
|
${ui_files}
|
|
${qrc_files}
|
|
)
|
|
target_link_libraries(mywidget ${Qt5Widgets_LIBRARIES})
|