From f728efb3be25325be7776211b2ac03bf5e9c7edd Mon Sep 17 00:00:00 2001 From: Klaus Basan Date: Wed, 6 Jun 2018 01:14:53 +0200 Subject: [PATCH] Ref T270, Ref T275 FSX/P3D moved the common parts of the .pro files into .pri files and included those Remark: See also https://swift-project.slack.com/archives/G7GD2UP9C/p1528277800000196 --- src/plugins/simulator/fsx/fsx.pro | 34 ++----------- src/plugins/simulator/fsxcommon/fsxcommon.pro | 20 ++------ src/plugins/simulator/fsxconfig/fsxconfig.pro | 32 ++----------- src/plugins/simulator/fsxp3d.pri | 30 ++++++++++++ src/plugins/simulator/fsxp3d_include.pri | 12 +++++ src/plugins/simulator/p3d/p3d.pro | 48 ++----------------- src/plugins/simulator/p3dconfig/p3dconfig.pro | 42 ++-------------- 7 files changed, 63 insertions(+), 155 deletions(-) create mode 100644 src/plugins/simulator/fsxp3d.pri create mode 100644 src/plugins/simulator/fsxp3d_include.pri diff --git a/src/plugins/simulator/fsx/fsx.pro b/src/plugins/simulator/fsx/fsx.pro index 8016473d9..49a7895b9 100644 --- a/src/plugins/simulator/fsx/fsx.pro +++ b/src/plugins/simulator/fsx/fsx.pro @@ -1,37 +1,11 @@ load(common_pre) -REQUIRES += contains(BLACK_CONFIG,FSX) - -QT += core dbus widgets - -TARGET = simulatorfsx -TEMPLATE = lib - -CONFIG += plugin shared -CONFIG += blackconfig blackmisc blackcore blackgui - -DEPENDPATH += . $$SourceRoot/src -INCLUDEPATH += . $$SourceRoot/src -INCLUDEPATH *= $$EXTERNALSROOT/common/include/simconnect/FSX-XPack SOURCES += *.cpp HEADERS += *.h + +REQUIRES += contains(BLACK_CONFIG,FSX) +TARGET = simulatorfsx DISTFILES += simulatorfsx.json -DESTDIR = $$DestRoot/bin/plugins/simulator - -LIBS *= -L$$EXTERNALS_LIB_DIR/FSX-XPack -LIBS *= -lsimulatorfscommon -lsimulatorfsxcommon -lfsuipc -lSimConnect -lsimulatorplugincommon -LIBS += -ldxguid -lole32 -addStaticLibraryDependency(simulatorfscommon) -addStaticLibraryDependency(simulatorfsxcommon) -addStaticLibraryDependency(fsuipc) -addStaticLibraryDependency(simulatorplugincommon) - -win32 { - dlltarget.path = $$PREFIX/bin/plugins/simulator - INSTALLS += dlltarget -} else { - target.path = $$PREFIX/bin/plugins/simulator - INSTALLS += target -} +include(../fsxp3d.pri) load(common_post) diff --git a/src/plugins/simulator/fsxcommon/fsxcommon.pro b/src/plugins/simulator/fsxcommon/fsxcommon.pro index 2eecdc0ba..cde2e2cf9 100644 --- a/src/plugins/simulator/fsxcommon/fsxcommon.pro +++ b/src/plugins/simulator/fsxcommon/fsxcommon.pro @@ -5,30 +5,20 @@ QT += core dbus network widgets TARGET = simulatorfsxcommon TEMPLATE = lib +SOURCES += *.cpp +HEADERS += *.h +FORMS += *.ui + CONFIG += staticlib CONFIG += blackconfig blackmisc blackcore blackgui DEPENDPATH += . $$SourceRoot/src INCLUDEPATH += . $$SourceRoot/src -SOURCES += *.cpp -HEADERS += *.h -FORMS += *.ui DESTDIR = $$DestRoot/lib LIBS += -lsimulatorfscommon -lfsuipc -lsimulatorplugincommon -equals(WORD_SIZE,64) { - INCLUDEPATH *= $$EXTERNALSROOT/common/include/simconnect/P3D-v4.1 - LIBS *= -L$$EXTERNALS_LIB_DIR/P3D-v4.1 - LIBS *= -lAdvapi32 - CONFIG(debug, debug|release): LIBS *= -lSimConnectDebug - else: LIBS *= -lSimConnect -} -equals(WORD_SIZE,32) { - INCLUDEPATH *= $$EXTERNALSROOT/common/include/simconnect/FSX-XPack - LIBS *= -L$$EXTERNALS_LIB_DIR/FSX-XPack - LIBS *= -lSimConnect -} +include(../fsxp3d_include.pri) addStaticLibraryDependency(fsuipc) addStaticLibraryDependency(simulatorplugincommon) diff --git a/src/plugins/simulator/fsxconfig/fsxconfig.pro b/src/plugins/simulator/fsxconfig/fsxconfig.pro index 27acd5e5d..e74502fa1 100644 --- a/src/plugins/simulator/fsxconfig/fsxconfig.pro +++ b/src/plugins/simulator/fsxconfig/fsxconfig.pro @@ -1,35 +1,11 @@ load(common_pre) -QT += core dbus network widgets - -TARGET = simulatorfsxconfig -TEMPLATE = lib -CONFIG += plugin shared -CONFIG += blackconfig blackmisc blackcore blackgui - -DEPENDPATH += . $$SourceRoot/src -INCLUDEPATH += . $$SourceRoot/src - SOURCES += *.cpp HEADERS += *.h -DISTFILES += simulatorfsxconfig.json -LIBS += -lsimulatorfsxcommon -DESTDIR = $$DestRoot/bin/plugins/simulator -LIBS *= -L$$EXTERNALS_LIB_DIR/FSX-XPack -LIBS *= -lsimulatorfscommon -lsimulatorfsxcommon -lfsuipc -lSimConnect -lsimulatorplugincommon -LIBS += -ldxguid -lole32 -addStaticLibraryDependency(simulatorfscommon) -addStaticLibraryDependency(simulatorfsxcommon) -addStaticLibraryDependency(fsuipc) -addStaticLibraryDependency(simulatorplugincommon) - -win32 { - dlltarget.path = $$PREFIX/bin/plugins/simulator - INSTALLS += dlltarget -} else { - target.path = $$PREFIX/bin/plugins/simulator - INSTALLS += target -} +REQUIRES += contains(BLACK_CONFIG,FSX) +TARGET = simulatorfsxconfig +DISTFILES += simulatorfsx.json +include(../fsxp3d.pri) load(common_post) diff --git a/src/plugins/simulator/fsxp3d.pri b/src/plugins/simulator/fsxp3d.pri new file mode 100644 index 000000000..dda9fbbb8 --- /dev/null +++ b/src/plugins/simulator/fsxp3d.pri @@ -0,0 +1,30 @@ +QT += core dbus widgets + +TEMPLATE = lib + +CONFIG += plugin shared +CONFIG += blackconfig blackmisc blackcore blackgui + +DEPENDPATH += . $$SourceRoot/src +INCLUDEPATH += . $$SourceRoot/src +DESTDIR = $$DestRoot/bin/plugins/simulator + +LIBS += -lsimulatorfsxcommon -lsimulatorfscommon -lfsuipc -lsimulatorplugincommon + +include(fsxp3d_include.pri) + +addStaticLibraryDependency(simulatorfscommon) +addStaticLibraryDependency(simulatorfsxcommon) +addStaticLibraryDependency(fsuipc) +addStaticLibraryDependency(simulatorplugincommon) + +# Ignore linker warning about missing pdb files from Simconnect +msvc: QMAKE_LFLAGS *= /ignore:4099 + +win32 { + dlltarget.path = $$PREFIX/bin/plugins/simulator + INSTALLS += dlltarget +} else { + target.path = $$PREFIX/bin/plugins/simulator + INSTALLS += target +} diff --git a/src/plugins/simulator/fsxp3d_include.pri b/src/plugins/simulator/fsxp3d_include.pri new file mode 100644 index 000000000..1b611d229 --- /dev/null +++ b/src/plugins/simulator/fsxp3d_include.pri @@ -0,0 +1,12 @@ +equals(WORD_SIZE,64) { + INCLUDEPATH *= $$EXTERNALSROOT/common/include/simconnect/P3D-v4.1 + LIBS *= -L$$EXTERNALS_LIB_DIR/P3D-v4.1 + LIBS *= -lAdvapi32 + CONFIG(debug, debug|release): LIBS *= -lSimConnectDebug + else: LIBS *= -lSimConnect +} +equals(WORD_SIZE,32) { + INCLUDEPATH *= $$EXTERNALSROOT/common/include/simconnect/FSX-XPack + LIBS *= -L$$EXTERNALS_LIB_DIR/FSX-XPack + LIBS *= -lSimConnect +} diff --git a/src/plugins/simulator/p3d/p3d.pro b/src/plugins/simulator/p3d/p3d.pro index 58b5cb18e..cdf616ac1 100644 --- a/src/plugins/simulator/p3d/p3d.pro +++ b/src/plugins/simulator/p3d/p3d.pro @@ -1,51 +1,11 @@ load(common_pre) -REQUIRES += contains(BLACK_CONFIG,P3D) - -QT += core dbus widgets - -TARGET = simulatorp3d -TEMPLATE = lib - -CONFIG += plugin shared -CONFIG += blackconfig blackmisc blackcore blackgui - -DEPENDPATH += . $$SourceRoot/src -INCLUDEPATH += . $$SourceRoot/src SOURCES += *.cpp HEADERS += *.h + +REQUIRES += contains(BLACK_CONFIG,P3D) +TARGET = simulatorp3d DISTFILES += simulatorp3d.json -DESTDIR = $$DestRoot/bin/plugins/simulator - -LIBS += -lsimulatorfscommon -lsimulatorfsxcommon -lfsuipc -lsimulatorplugincommon - -equals(WORD_SIZE,64) { - INCLUDEPATH *= $$EXTERNALSROOT/common/include/simconnect/P3D-v4.1 - LIBS *= -L$$EXTERNALS_LIB_DIR/P3D-v4.1 - LIBS *= -lAdvapi32 - CONFIG(debug, debug|release): LIBS *= -lSimConnectDebug - else: LIBS *= -lSimConnect -} -equals(WORD_SIZE,32) { - INCLUDEPATH *= $$EXTERNALSROOT/common/include/simconnect/FSX-XPack - LIBS *= -L$$EXTERNALS_LIB_DIR/FSX-XPack - LIBS *= -lSimConnect -} - -addStaticLibraryDependency(simulatorfscommon) -addStaticLibraryDependency(simulatorfsxcommon) -addStaticLibraryDependency(fsuipc) -addStaticLibraryDependency(simulatorplugincommon) - -# Ignore linker warning about missing pdb files from Simconnect -msvc: QMAKE_LFLAGS *= /ignore:4099 - -win32 { - dlltarget.path = $$PREFIX/bin/plugins/simulator - INSTALLS += dlltarget -} else { - target.path = $$PREFIX/bin/plugins/simulator - INSTALLS += target -} +include(../fsxp3d.pri) load(common_post) diff --git a/src/plugins/simulator/p3dconfig/p3dconfig.pro b/src/plugins/simulator/p3dconfig/p3dconfig.pro index 382ba8835..5e01449b5 100644 --- a/src/plugins/simulator/p3dconfig/p3dconfig.pro +++ b/src/plugins/simulator/p3dconfig/p3dconfig.pro @@ -1,45 +1,11 @@ load(common_pre) -QT += core dbus network widgets - -TARGET = simulatorp3dconfig -TEMPLATE = lib -CONFIG += plugin shared -CONFIG += blackconfig blackmisc blackcore blackgui - -DEPENDPATH += . $$SourceRoot/src -INCLUDEPATH += . $$SourceRoot/src SOURCES += *.cpp HEADERS += *.h + +REQUIRES += contains(BLACK_CONFIG,P3D) +TARGET = simulatorp3dconfig DISTFILES += simulatorp3d.json -DESTDIR = $$DestRoot/bin/plugins/simulator - -LIBS += -lsimulatorfscommon -lsimulatorfsxcommon -lfsuipc -lsimulatorplugincommon - -equals(WORD_SIZE,64) { - INCLUDEPATH *= $$EXTERNALSROOT/common/include/simconnect/P3D-v4.1 - LIBS *= -L$$EXTERNALS_LIB_DIR/P3D-v4.1 - LIBS *= -lAdvapi32 - CONFIG(debug, debug|release): LIBS *= -lSimConnectDebug - else: LIBS *= -lSimConnect -} -equals(WORD_SIZE,32) { - INCLUDEPATH *= $$EXTERNALSROOT/common/include/simconnect/FSX-XPack - LIBS *= -L$$EXTERNALS_LIB_DIR/FSX-XPack - LIBS *= -lSimConnect -} - -addStaticLibraryDependency(simulatorfscommon) -addStaticLibraryDependency(simulatorfsxcommon) -addStaticLibraryDependency(fsuipc) -addStaticLibraryDependency(simulatorplugincommon) - -win32 { - dlltarget.path = $$PREFIX/bin/plugins/simulator - INSTALLS += dlltarget -} else { - target.path = $$PREFIX/bin/plugins/simulator - INSTALLS += target -} +include(../fsxp3d.pri) load(common_post)