From 1801616953f1499e50652f8021d2cc6d39d11f18 Mon Sep 17 00:00:00 2001 From: Mathew Sutcliffe Date: Mon, 21 Mar 2016 00:57:27 +0000 Subject: [PATCH] refs #624 Use conditional SUBDIRS instead of REQUIRES for enabling/disabling subprojects. --- docs/docs.pro | 2 -- samples/samples.pro | 2 -- src/blackcore/blackcore.pro | 2 -- src/blackgui/blackgui.pro | 2 -- src/blackinput/blackinput.pro | 2 -- src/blacksound/blacksound.pro | 2 -- src/plugins/simulator/fs9/fs9.pro | 2 -- src/plugins/simulator/fscommon/fscommon.pro | 2 -- src/plugins/simulator/fsxconfig/fsxconfig.pro | 2 -- src/plugins/simulator/simulator.pro | 20 +++++++---- src/plugins/simulator/xplane/xplane.pro | 2 -- .../simulator/xplaneconfig/xplaneconfig.pro | 2 -- src/src.pro | 36 ++++++++++++++----- src/swiftcore/swiftcore.pro | 2 -- src/swiftdata/swiftdata.pro | 2 -- src/swiftguistandard/swiftguistandard.pro | 2 -- src/swiftlauncher/swiftlauncher.pro | 2 -- src/xbus/xbus.pro | 2 -- swift.pro | 12 +++++-- tests/tests.pro | 2 -- 20 files changed, 50 insertions(+), 52 deletions(-) diff --git a/docs/docs.pro b/docs/docs.pro index 7c6aff8a4..ef0319863 100644 --- a/docs/docs.pro +++ b/docs/docs.pro @@ -1,7 +1,5 @@ load(common_pre) -REQUIRES += contains(BLACK_CONFIG,Doxygen) - TEMPLATE = lib CONFIG += staticlib CONFIG -= qt diff --git a/samples/samples.pro b/samples/samples.pro index d795c0c1d..3a522ef36 100644 --- a/samples/samples.pro +++ b/samples/samples.pro @@ -1,7 +1,5 @@ load(common_pre) -REQUIRES += contains(BLACK_CONFIG,Samples) - TEMPLATE = subdirs CONFIG += ordered diff --git a/src/blackcore/blackcore.pro b/src/blackcore/blackcore.pro index fb6e537fb..69ffa3dba 100644 --- a/src/blackcore/blackcore.pro +++ b/src/blackcore/blackcore.pro @@ -1,7 +1,5 @@ load(common_pre) -REQUIRES += contains(BLACK_CONFIG,BlackCore) - # GUI is required for the matrix classes # Network for host info etc. QT += network dbus xml multimedia diff --git a/src/blackgui/blackgui.pro b/src/blackgui/blackgui.pro index 155ceec18..6aa2a6e2e 100644 --- a/src/blackgui/blackgui.pro +++ b/src/blackgui/blackgui.pro @@ -1,7 +1,5 @@ load(common_pre) -REQUIRES += contains(BLACK_CONFIG,BlackGui) - QT += network dbus gui svg widgets TARGET = blackgui diff --git a/src/blackinput/blackinput.pro b/src/blackinput/blackinput.pro index 5c8e98bae..5d74e15ac 100644 --- a/src/blackinput/blackinput.pro +++ b/src/blackinput/blackinput.pro @@ -1,7 +1,5 @@ load(common_pre) -REQUIRES += contains(BLACK_CONFIG,BlackInput) - QT += network dbus gui widgets multimedia TARGET = blackinput diff --git a/src/blacksound/blacksound.pro b/src/blacksound/blacksound.pro index 3144ccaf0..cd5625e38 100644 --- a/src/blacksound/blacksound.pro +++ b/src/blacksound/blacksound.pro @@ -1,7 +1,5 @@ load(common_pre) -REQUIRES += contains(BLACK_CONFIG,BlackSound) - QT += network dbus gui multimedia TARGET = blacksound diff --git a/src/plugins/simulator/fs9/fs9.pro b/src/plugins/simulator/fs9/fs9.pro index 3f3c8218b..f567f7ee1 100644 --- a/src/plugins/simulator/fs9/fs9.pro +++ b/src/plugins/simulator/fs9/fs9.pro @@ -1,7 +1,5 @@ load(common_pre) -REQUIRES += contains(BLACK_CONFIG,FS9) - QT += core dbus gui network concurrent xml TARGET = simulatorfs9 diff --git a/src/plugins/simulator/fscommon/fscommon.pro b/src/plugins/simulator/fscommon/fscommon.pro index 8e3268a57..7dd7e6858 100644 --- a/src/plugins/simulator/fscommon/fscommon.pro +++ b/src/plugins/simulator/fscommon/fscommon.pro @@ -1,7 +1,5 @@ load(common_pre) -REQUIRES += contains(BLACK_CONFIG,FSX|FS9) - QT += core dbus concurrent xml TARGET = simulatorfscommon diff --git a/src/plugins/simulator/fsxconfig/fsxconfig.pro b/src/plugins/simulator/fsxconfig/fsxconfig.pro index ebec74c42..b358a0334 100644 --- a/src/plugins/simulator/fsxconfig/fsxconfig.pro +++ b/src/plugins/simulator/fsxconfig/fsxconfig.pro @@ -1,7 +1,5 @@ load(common_pre) -REQUIRES += contains(BLACK_CONFIG,FSX) - QT += core widgets dbus network TARGET = simulatorfsxconfig diff --git a/src/plugins/simulator/simulator.pro b/src/plugins/simulator/simulator.pro index a0fddb55a..802374d2d 100644 --- a/src/plugins/simulator/simulator.pro +++ b/src/plugins/simulator/simulator.pro @@ -3,11 +3,19 @@ load(common_pre) TEMPLATE = subdirs CONFIG += ordered -SUBDIRS += fscommon -SUBDIRS += fsx -SUBDIRS += fsxconfig -SUBDIRS += fs9 -SUBDIRS += xplane -SUBDIRS += xplaneconfig +contains(BLACK_CONFIG,FSX|FS9) { + SUBDIRS += fscommon +} +contains(BLACK_CONFIG,FSX) { + SUBDIRS += fsx + SUBDIRS += fsxconfig +} +contains(BLACK_CONFIG,FS9) { + SUBDIRS += fs9 +} +contains(BLACK_CONFIG,XPlane) { + SUBDIRS += xplane + SUBDIRS += xplaneconfig +} load(common_post) diff --git a/src/plugins/simulator/xplane/xplane.pro b/src/plugins/simulator/xplane/xplane.pro index 6d7e662af..d775ffb49 100644 --- a/src/plugins/simulator/xplane/xplane.pro +++ b/src/plugins/simulator/xplane/xplane.pro @@ -1,7 +1,5 @@ load(common_pre) -REQUIRES += contains(BLACK_CONFIG,XPlane) - QT += core dbus network TARGET = simulatorxplane diff --git a/src/plugins/simulator/xplaneconfig/xplaneconfig.pro b/src/plugins/simulator/xplaneconfig/xplaneconfig.pro index 6bcff4233..80a10923d 100644 --- a/src/plugins/simulator/xplaneconfig/xplaneconfig.pro +++ b/src/plugins/simulator/xplaneconfig/xplaneconfig.pro @@ -1,7 +1,5 @@ load(common_pre) -REQUIRES += contains(BLACK_CONFIG,XPlane) - QT += core widgets dbus TARGET = simulatorxplaneconfig diff --git a/src/src.pro b/src/src.pro index a0d861f7e..999edae5c 100644 --- a/src/src.pro +++ b/src/src.pro @@ -4,15 +4,33 @@ TEMPLATE = subdirs CONFIG += ordered SUBDIRS += blackmisc -SUBDIRS += blacksound -SUBDIRS += blackinput -SUBDIRS += blackcore -SUBDIRS += blackgui -SUBDIRS += swiftguistandard -SUBDIRS += swiftcore -SUBDIRS += swiftdata -SUBDIRS += swiftlauncher -SUBDIRS += xbus +contains(BLACK_CONFIG,BlackSound) { + SUBDIRS += blacksound +} +contains(BLACK_CONFIG,BlackInput) { + SUBDIRS += blackinput +} +contains(BLACK_CONFIG,BlackCore) { + SUBDIRS += blackcore +} +contains(BLACK_CONFIG,BlackGui) { + SUBDIRS += blackgui +} +contains(BLACK_CONFIG,SwiftGui) { + SUBDIRS += swiftguistandard +} +contains(BLACK_CONFIG,SwiftCore) { + SUBDIRS += swiftcore +} +contains(BLACK_CONFIG,SwiftData) { + SUBDIRS += swiftdata +} +contains(BLACK_CONFIG,SwiftLauncher) { + SUBDIRS += swiftlauncher +} +contains(BLACK_CONFIG,XPlane) { + SUBDIRS += xbus +} SUBDIRS += plugins load(common_post) diff --git a/src/swiftcore/swiftcore.pro b/src/swiftcore/swiftcore.pro index 5b4b9c864..7ac66977f 100644 --- a/src/swiftcore/swiftcore.pro +++ b/src/swiftcore/swiftcore.pro @@ -1,7 +1,5 @@ load(common_pre) -REQUIRES += contains(BLACK_CONFIG,SwiftCore) - QT += core dbus network xml multimedia gui svg greaterThan(QT_MAJOR_VERSION, 4): QT += widgets diff --git a/src/swiftdata/swiftdata.pro b/src/swiftdata/swiftdata.pro index 4cb3f3e64..0a8e3ef28 100644 --- a/src/swiftdata/swiftdata.pro +++ b/src/swiftdata/swiftdata.pro @@ -1,7 +1,5 @@ load(common_pre) -REQUIRES += contains(BLACK_CONFIG,SwiftData) - QT += core dbus network xml multimedia gui svg greaterThan(QT_MAJOR_VERSION, 4): QT += widgets diff --git a/src/swiftguistandard/swiftguistandard.pro b/src/swiftguistandard/swiftguistandard.pro index f30ee2563..172294096 100644 --- a/src/swiftguistandard/swiftguistandard.pro +++ b/src/swiftguistandard/swiftguistandard.pro @@ -1,7 +1,5 @@ load(common_pre) -REQUIRES += contains(BLACK_CONFIG,SwiftGui) - QT += core dbus gui svg network xml multimedia greaterThan(QT_MAJOR_VERSION, 4): QT += widgets diff --git a/src/swiftlauncher/swiftlauncher.pro b/src/swiftlauncher/swiftlauncher.pro index eb1731519..3032b4e12 100644 --- a/src/swiftlauncher/swiftlauncher.pro +++ b/src/swiftlauncher/swiftlauncher.pro @@ -1,7 +1,5 @@ load(common_pre) -REQUIRES += contains(BLACK_CONFIG,SwiftLauncher) - QT += core dbus gui svg network xml multimedia # QWebEngine is not supported for MinGW diff --git a/src/xbus/xbus.pro b/src/xbus/xbus.pro index 439498ba0..b881cd163 100644 --- a/src/xbus/xbus.pro +++ b/src/xbus/xbus.pro @@ -1,7 +1,5 @@ load(common_pre) -REQUIRES += contains(BLACK_CONFIG,XPlane) - QT += core gui widgets dbus network TEMPLATE = lib diff --git a/swift.pro b/swift.pro index 390b7c358..b81d1db05 100644 --- a/swift.pro +++ b/swift.pro @@ -6,11 +6,17 @@ CONFIG += ordered OTHER_FILES += mkspecs/features/*.prf OTHER_FILES += mkspecs/features/*.pri -SUBDIRS += docs +contains(BLACK_CONFIG,Doxygen) { + SUBDIRS += docs +} SUBDIRS += resources SUBDIRS += src -SUBDIRS += samples -SUBDIRS += tests +contains(BLACK_CONFIG,Samples) { + SUBDIRS += samples +} +contains(BLACK_CONFIG,Unittests) { + SUBDIRS += tests +} include(install.pri) diff --git a/tests/tests.pro b/tests/tests.pro index e8c1d756b..3bc69a15c 100644 --- a/tests/tests.pro +++ b/tests/tests.pro @@ -1,7 +1,5 @@ load(common_pre) -REQUIRES += contains(BLACK_CONFIG,Unittests) - TEMPLATE = subdirs CONFIG += ordered