summaryrefslogtreecommitdiffstats
path: root/tests/auto/cmake/test_moc_macro_target/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/cmake/test_moc_macro_target/CMakeLists.txt')
-rw-r--r--tests/auto/cmake/test_moc_macro_target/CMakeLists.txt23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/auto/cmake/test_moc_macro_target/CMakeLists.txt b/tests/auto/cmake/test_moc_macro_target/CMakeLists.txt
new file mode 100644
index 0000000000..e97ac199e8
--- /dev/null
+++ b/tests/auto/cmake/test_moc_macro_target/CMakeLists.txt
@@ -0,0 +1,23 @@
+
+cmake_minimum_required(VERSION 2.8)
+
+project(test_moc_macro_target)
+
+find_package(Qt5Core REQUIRED)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+qt5_generate_moc(main_gen_test.cpp
+ "${CMAKE_CURRENT_BINARY_DIR}/main_gen_test.moc"
+ TARGET Qt5GenerateMacroTest
+)
+add_executable(Qt5GenerateMacroTest WIN32 main_gen_test.cpp "${CMAKE_CURRENT_BINARY_DIR}/main_gen_test.moc")
+target_include_directories(Qt5GenerateMacroTest PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/interface")
+target_link_libraries(Qt5GenerateMacroTest Qt5::Core)
+
+qt5_wrap_cpp(moc_file mywrapobject.h
+ TARGET Qt5WrapMacroTest
+)
+add_executable(Qt5WrapMacroTest WIN32 main_wrap_test.cpp ${moc_file})
+target_include_directories(Qt5WrapMacroTest PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/interface")
+target_link_libraries(Qt5WrapMacroTest Qt5::Core)