diff options
author | Stephen Kelly <steveire@gmail.com> | 2014-04-30 06:35:51 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-05-06 17:39:45 (GMT) |
commit | 17c31b8bd4aa56d924b94cf41b9c4a6a90d23264 (patch) | |
tree | e29fba49d842d6dff1db637c5bbd4c2ff82a9835 /Tests/Qt4Targets/IncrementalMoc | |
parent | 6a5bd7f0dacd96b66c294919fa5859ca12224d5f (diff) | |
download | CMake-17c31b8bd4aa56d924b94cf41b9c4a6a90d23264.zip CMake-17c31b8bd4aa56d924b94cf41b9c4a6a90d23264.tar.gz CMake-17c31b8bd4aa56d924b94cf41b9c4a6a90d23264.tar.bz2 |
Qt4: Extend the Qt4Targets test to cover dir and target moc parameters.
Diffstat (limited to 'Tests/Qt4Targets/IncrementalMoc')
-rw-r--r-- | Tests/Qt4Targets/IncrementalMoc/CMakeLists.txt | 12 |
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() |