diff --git a/qtxmlpatterns.pro b/qtxmlpatterns.pro
index effac282f29a29bc2f27a12b1e15eea4ab761c65..bd5da3cb57b9baa2b59dc3d16a488c4b30f300ae 100644
--- a/qtxmlpatterns.pro
+++ b/qtxmlpatterns.pro
@@ -10,6 +10,9 @@ module_qtxmlpatterns_tools.depends = module_qtxmlpatterns_src
 module_qtxmlpatterns_examples.subdir = examples/xmlpatterns
 module_qtxmlpatterns_examples.target = module-qtxmlpatterns-examples
 module_qtxmlpatterns_examples.depends = module_qtxmlpatterns_src
+!contains(QT_BUILD_PARTS,examples) {
+    module_qtxmlpatterns_examples.CONFIG = no_default_target no_default_install
+}
 
 module_qtxmlpatterns_tests.subdir = tests
 module_qtxmlpatterns_tests.target = module-qtxmlpatterns-tests