summaryrefslogtreecommitdiffstats
path: root/Tests/QtAutogen/MocOptions2/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/QtAutogen/MocOptions2/CMakeLists.txt')
-rw-r--r--Tests/QtAutogen/MocOptions2/CMakeLists.txt10
1 files changed, 10 insertions, 0 deletions
diff --git a/Tests/QtAutogen/MocOptions2/CMakeLists.txt b/Tests/QtAutogen/MocOptions2/CMakeLists.txt
new file mode 100644
index 0000000..c664f4d
--- /dev/null
+++ b/Tests/QtAutogen/MocOptions2/CMakeLists.txt
@@ -0,0 +1,10 @@
+cmake_minimum_required(VERSION 3.16)
+project(MocOptions2)
+include("../AutogenCoreTest.cmake")
+
+# Test extra options passed to moc via AUTOMOC_MOC_OPTIONS
+add_executable(mocOptions object.cpp main.cpp)
+set_property(TARGET mocOptions PROPERTY AUTOMOC ON)
+target_compile_options(mocOptions PRIVATE "-D_EXTRA_DEFINE")
+set_property(TARGET mocOptions PROPERTY AUTOMOC_MOC_OPTIONS "-D_EXTRA_DEFINE")
+target_link_libraries(mocOptions ${QT_LIBRARIES})