summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2013-08-07 14:48:09 (GMT)
committerStephen Kelly <steveire@gmail.com>2013-08-28 08:18:11 (GMT)
commitd4937da71b4ca7e3d73b79c3b28c10ec84690ac4 (patch)
tree7918d53d0b5c256dd8d28c61df7517f6a563f0ab /Tests
parentb15ad0d1de7524be3b32d6691b68d3578ee00ca5 (diff)
downloadCMake-d4937da71b4ca7e3d73b79c3b28c10ec84690ac4.zip
CMake-d4937da71b4ca7e3d73b79c3b28c10ec84690ac4.tar.gz
CMake-d4937da71b4ca7e3d73b79c3b28c10ec84690ac4.tar.bz2
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