summaryrefslogtreecommitdiffstats
path: root/Tests/Qt4Targets/IncrementalMoc/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/Qt4Targets/IncrementalMoc/CMakeLists.txt')
-rw-r--r--Tests/Qt4Targets/IncrementalMoc/CMakeLists.txt12
1 files changed, 10 insertions, 2 deletions
diff --git a/Tests/Qt4Targets/IncrementalMoc/CMakeLists.txt b/Tests/Qt4Targets/IncrementalMoc/CMakeLists.txt
index 4ba0ced..65e2b64 100644
--- a/Tests/Qt4Targets/IncrementalMoc/CMakeLists.txt
+++ b/Tests/Qt4Targets/IncrementalMoc/CMakeLists.txt
@@ -4,10 +4,18 @@ project(IncrementalMoc)
find_package(Qt4 REQUIRED)
-qt4_generate_moc(foo.h moc_foo.cpp)
+if (ADD_TARGET_DEF)
+ set(target_args TARGET testlib)
+endif()
+
+if (ADD_DIR_DEF)
+ add_definitions(-DNEW_DEF)
+endif()
+
+qt4_generate_moc(foo.h moc_foo.cpp ${target_args})
add_library(testlib foo.cpp moc_foo.cpp)
target_link_libraries(testlib Qt4::QtCore)
-if (ADD_DEF)
+if (ADD_TARGET_DEF)
target_compile_definitions(testlib PRIVATE NEW_DEF)
endif()