summaryrefslogtreecommitdiffstats
path: root/tests/auto/cmake/test_QTBUG-63422/CMakeLists.txt
diff options
context:
space:
mode:
authorKevin Funk <kevin.funk@kdab.com>2017-09-29 22:17:10 +0200
committerDavid Faure <david.faure@kdab.com>2017-11-22 13:51:30 +0000
commitb71b7461b0b95bbf02c215019381b19e4070e07c (patch)
treeb41652ad0d3e5deda83b857c866d70d02f643d0a /tests/auto/cmake/test_QTBUG-63422/CMakeLists.txt
parentc3a5c482efcac794033721e4e32b01b012704096 (diff)
CMake: Set SKIP_AUTOMOC/AUTOUIC where needed
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>
Diffstat (limited to 'tests/auto/cmake/test_QTBUG-63422/CMakeLists.txt')
-rw-r--r--tests/auto/cmake/test_QTBUG-63422/CMakeLists.txt30
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/auto/cmake/test_QTBUG-63422/CMakeLists.txt b/tests/auto/cmake/test_QTBUG-63422/CMakeLists.txt
new file mode 100644
index 0000000000..a0b82caee4
--- /dev/null
+++ b/tests/auto/cmake/test_QTBUG-63422/CMakeLists.txt
@@ -0,0 +1,30 @@
+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})