mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-30 11:55:35 +08:00
Replace qmake variable BLACK_CONFIG with a system based on json files.
The config is loaded from json files by qmake, and we define the qmake function `swiftConfig` for checking whether a feature is enabled. This function can be directly used in `buildconfig_gen.cpp.in`, so the trick with C++ comment tokens in variables is not needed.
This commit is contained in:
@@ -17,7 +17,7 @@ HEADERS += *.h
|
||||
LIBS *= -lsimulatorplugincommon
|
||||
addStaticLibraryDependency(simulatorplugincommon)
|
||||
|
||||
contains(BLACK_CONFIG, FSUIPC) {
|
||||
swiftConfig(sims.fsuipc) {
|
||||
equals(WORD_SIZE,32) {
|
||||
DEFINES += SWIFT_USING_FSUIPC32
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ DESTDIR = $$DestRoot/bin/plugins/simulator
|
||||
SOURCES += *.cpp
|
||||
HEADERS += *.h
|
||||
|
||||
REQUIRES += contains(BLACK_CONFIG,FSX)
|
||||
REQUIRES += swiftConfig(sims.fsx)
|
||||
TARGET = simulatorfsx
|
||||
DISTFILES += simulatorfsx.json
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ DESTDIR = $$DestRoot/bin/plugins/simulator
|
||||
SOURCES += *.cpp
|
||||
HEADERS += *.h
|
||||
|
||||
REQUIRES += contains(BLACK_CONFIG,FSX)
|
||||
REQUIRES += swiftConfig(sims.fsx)
|
||||
TARGET = simulatorfsxconfig
|
||||
DISTFILES += simulatorfsx.json
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ DESTDIR = $$DestRoot/bin/plugins/simulator
|
||||
SOURCES += *.cpp
|
||||
HEADERS += *.h
|
||||
|
||||
REQUIRES += contains(BLACK_CONFIG,P3D)
|
||||
REQUIRES += swiftConfig(sims.p3d)
|
||||
TARGET = simulatorp3d
|
||||
DISTFILES += simulatorp3d.json
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ DESTDIR = $$DestRoot/bin/plugins/simulator
|
||||
SOURCES += *.cpp
|
||||
HEADERS += *.h
|
||||
|
||||
REQUIRES += contains(BLACK_CONFIG,P3D)
|
||||
REQUIRES += swiftConfig(sims.p3d)
|
||||
TARGET = simulatorp3dconfig
|
||||
DISTFILES += simulatorp3d.json
|
||||
|
||||
|
||||
@@ -7,26 +7,26 @@ SUBDIRS += plugincommon
|
||||
SUBDIRS += emulated
|
||||
SUBDIRS += emulatedconfig
|
||||
|
||||
contains(BLACK_CONFIG,FSX|FS9|P3D) {
|
||||
swiftConfig(sims.fsx)|swiftConfig(sims.fs9)|swiftConfig(sims.p3d) {
|
||||
SUBDIRS += fsuipc32
|
||||
SUBDIRS += fsuipc64
|
||||
SUBDIRS += fscommon
|
||||
}
|
||||
contains(BLACK_CONFIG,FSX|P3D) {
|
||||
swiftConfig(sims.fsx)|swiftConfig(sims.p3d) {
|
||||
SUBDIRS += fsxcommon
|
||||
}
|
||||
contains(BLACK_CONFIG,P3D) {
|
||||
swiftConfig(sims.p3d) {
|
||||
SUBDIRS += p3d
|
||||
SUBDIRS += p3dconfig
|
||||
}
|
||||
contains(BLACK_CONFIG,FSX) {
|
||||
swiftConfig(sims.fsx) {
|
||||
SUBDIRS += fsx
|
||||
SUBDIRS += fsxconfig
|
||||
}
|
||||
contains(BLACK_CONFIG,FS9):contains(BLACK_CONFIG,FSUIPC) {
|
||||
swiftConfig(sims.fs9):swiftConfig(sims.fsuipc) {
|
||||
SUBDIRS += fs9
|
||||
}
|
||||
contains(BLACK_CONFIG,XPlane) {
|
||||
swiftConfig(sims.xplane) {
|
||||
SUBDIRS += xplane
|
||||
SUBDIRS += xplaneconfig
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user