summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-10-07 19:41:33 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2013-10-07 19:41:33 (GMT)
commitea3bb7ed9a8a2b278c1aa9c4435e9f12f515535c (patch)
tree7c111a1cfc5691729ce61d9a61feed9a5306904d /Tests
parentf4acef500bb30563e1a6ec95cba0303adef71f79 (diff)
parentd4937da71b4ca7e3d73b79c3b28c10ec84690ac4 (diff)
downloadCMake-ea3bb7ed9a8a2b278c1aa9c4435e9f12f515535c.zip
CMake-ea3bb7ed9a8a2b278c1aa9c4435e9f12f515535c.tar.gz
CMake-ea3bb7ed9a8a2b278c1aa9c4435e9f12f515535c.tar.bz2
Merge topic 'automoc-gadget'
d4937da Search for the Q_GADGET macro for running automoc too.
Diffstat (limited to 'Tests')
-rw-r--r--Tests/QtAutomoc/CMakeLists.txt2
-rw-r--r--Tests/QtAutomoc/gadget.cpp4
-rw-r--r--Tests/QtAutomoc/gadget.h18
3 files changed, 23 insertions, 1 deletions
diff --git a/Tests/QtAutomoc/CMakeLists.txt b/Tests/QtAutomoc/CMakeLists.txt
index 69e52ac..8ad693a 100644
--- a/Tests/QtAutomoc/CMakeLists.txt
+++ b/Tests/QtAutomoc/CMakeLists.txt
@@ -41,7 +41,7 @@ add_library(codeeditorLib STATIC codeeditor.cpp)
add_library(privateSlot OBJECT private_slot.cpp)
add_executable(foo main.cpp calwidget.cpp foo.cpp blub.cpp bar.cpp abc.cpp
- xyz.cpp yaf.cpp $<TARGET_OBJECTS:privateSlot>)
+ xyz.cpp yaf.cpp gadget.cpp $<TARGET_OBJECTS:privateSlot>)
set_target_properties(foo codeeditorLib privateSlot PROPERTIES AUTOMOC TRUE)
diff --git a/Tests/QtAutomoc/gadget.cpp b/Tests/QtAutomoc/gadget.cpp
new file mode 100644
index 0000000..23d95fa
--- /dev/null
+++ b/Tests/QtAutomoc/gadget.cpp
@@ -0,0 +1,4 @@
+
+#include "gadget.h"
+
+#include "moc_gadget.cpp"
diff --git a/Tests/QtAutomoc/gadget.h b/Tests/QtAutomoc/gadget.h
new file mode 100644
index 0000000..7c688ee
--- /dev/null
+++ b/Tests/QtAutomoc/gadget.h
@@ -0,0 +1,18 @@
+
+#ifndef GADGET_H
+#define GADGET_H
+
+#include <QObject>
+
+class Gadget
+{
+ Q_GADGET
+ Q_ENUMS(Type)
+public:
+ enum Type {
+ Type0,
+ Type1
+ };
+};
+
+#endif