From 0099270008fa1d218fb5ed38028e6e27ca811bb1 Mon Sep 17 00:00:00 2001 From: Liang Qi Date: Thu, 21 Mar 2019 10:46:23 +0100 Subject: Fix the build with -no-gui Task-number: QTBUG-74602 Change-Id: If9cf0795e887a0b3cdfed0a6f5e7798116ef137d Reviewed-by: Oliver Wolff --- examples/examples.pro | 3 +++ qt3d.pro | 4 ++-- src/core/configure.json | 4 ++++ src/render/configure.json | 4 ++++ src/src.pro | 3 +++ tests/tests.pro | 3 +++ tools/tools.pro | 4 ++++ 7 files changed, 23 insertions(+), 2 deletions(-) diff --git a/examples/examples.pro b/examples/examples.pro index 6a3c01d76..037f14609 100644 --- a/examples/examples.pro +++ b/examples/examples.pro @@ -1,5 +1,8 @@ TEMPLATE = subdirs +!qtHaveModule(3dcore): \ + return() + QT_FOR_CONFIG += 3dcore qtConfig(qt3d-extras): SUBDIRS += qt3d diff --git a/qt3d.pro b/qt3d.pro index 847507f17..d5dbda4b9 100644 --- a/qt3d.pro +++ b/qt3d.pro @@ -1,5 +1,5 @@ -requires(qtHaveModule(gui)) -requires(qtConfig(opengl):!wasm) +qtHaveModule(gui): \ + requires(qtConfig(opengl):!wasm) CONFIG += examples_need_tools load(qt_parts) diff --git a/src/core/configure.json b/src/core/configure.json index e72c5ed2b..2ba205530 100644 --- a/src/core/configure.json +++ b/src/core/configure.json @@ -1,5 +1,9 @@ { "module": "3dcore", + "depends": [ + "gui" + ], + "condition": "module.gui && features.opengl && !config.wasm", "testDir": "../../config.tests", "commandline": { diff --git a/src/render/configure.json b/src/render/configure.json index ee5002707..02a6e3747 100644 --- a/src/render/configure.json +++ b/src/render/configure.json @@ -1,5 +1,9 @@ { "module": "3drender", + "depends": [ + "3dcore" + ], + "condition": "module.3dcore", "testDir": "./config.tests", "commandline": { diff --git a/src/src.pro b/src/src.pro index 853ae8fb5..0a3ed8cb7 100644 --- a/src/src.pro +++ b/src/src.pro @@ -1,5 +1,8 @@ TEMPLATE = subdirs +!qtHaveModule(gui): \ + return() + src_core.subdir = $$PWD/core src_core.target = sub-core diff --git a/tests/tests.pro b/tests/tests.pro index 157bdcea5..17c91cb1f 100644 --- a/tests/tests.pro +++ b/tests/tests.pro @@ -1,5 +1,8 @@ TEMPLATE = subdirs +!qtHaveModule(3dcore): \ + return() + QT_FOR_CONFIG += 3dcore !package { diff --git a/tools/tools.pro b/tools/tools.pro index 121507613..3b457ed50 100644 --- a/tools/tools.pro +++ b/tools/tools.pro @@ -1,4 +1,8 @@ TEMPLATE = subdirs + +!qtHaveModule(3dcore): \ + return() + QT_FOR_CONFIG += 3dcore-private qtConfig(assimp):qtConfig(commandlineparser): { SUBDIRS += qgltf -- cgit v1.2.3