diff options
Diffstat (limited to 'Tests/Qt4And5Automoc')
-rw-r--r-- | Tests/Qt4And5Automoc/CMakeLists.txt | 13 | ||||
-rw-r--r-- | Tests/Qt4And5Automoc/main.cpp | 18 | ||||
-rw-r--r-- | Tests/Qt4And5Automoc/main_qt4.cpp | 4 | ||||
-rw-r--r-- | Tests/Qt4And5Automoc/main_qt5.cpp | 4 |
4 files changed, 39 insertions, 0 deletions
diff --git a/Tests/Qt4And5Automoc/CMakeLists.txt b/Tests/Qt4And5Automoc/CMakeLists.txt new file mode 100644 index 0000000..0cc80fe --- /dev/null +++ b/Tests/Qt4And5Automoc/CMakeLists.txt @@ -0,0 +1,13 @@ + +project(Qt4And5Automoc) + +find_package(Qt4 REQUIRED) +find_package(Qt5Core REQUIRED) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +add_executable(qt4_exe main_qt4.cpp) +target_link_libraries(qt4_exe Qt4::QtCore) +add_executable(qt5_exe main_qt5.cpp) +target_link_libraries(qt5_exe Qt5::Core) diff --git a/Tests/Qt4And5Automoc/main.cpp b/Tests/Qt4And5Automoc/main.cpp new file mode 100644 index 0000000..00fd641 --- /dev/null +++ b/Tests/Qt4And5Automoc/main.cpp @@ -0,0 +1,18 @@ + +#include <QObject> + +class SomeObject : public QObject +{ + Q_OBJECT +public: + explicit SomeObject(QObject *parent = 0) + : QObject(parent) + { + + } +}; + +int main(int argc, char **argv) +{ + return 0; +} diff --git a/Tests/Qt4And5Automoc/main_qt4.cpp b/Tests/Qt4And5Automoc/main_qt4.cpp new file mode 100644 index 0000000..a84ce89 --- /dev/null +++ b/Tests/Qt4And5Automoc/main_qt4.cpp @@ -0,0 +1,4 @@ + +#include "main.cpp" + +#include "main_qt4.moc" diff --git a/Tests/Qt4And5Automoc/main_qt5.cpp b/Tests/Qt4And5Automoc/main_qt5.cpp new file mode 100644 index 0000000..287b261 --- /dev/null +++ b/Tests/Qt4And5Automoc/main_qt5.cpp @@ -0,0 +1,4 @@ + +#include "main.cpp" + +#include "main_qt5.moc" |