diff options
author | Stephen Kelly <steveire@gmail.com> | 2013-08-07 14:48:09 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2013-08-28 08:18:11 (GMT) |
commit | d4937da71b4ca7e3d73b79c3b28c10ec84690ac4 (patch) | |
tree | 7918d53d0b5c256dd8d28c61df7517f6a563f0ab /Tests | |
parent | b15ad0d1de7524be3b32d6691b68d3578ee00ca5 (diff) | |
download | CMake-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.txt | 2 | ||||
-rw-r--r-- | Tests/QtAutomoc/gadget.cpp | 4 | ||||
-rw-r--r-- | Tests/QtAutomoc/gadget.h | 18 |
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 |