Files
pilotclient/mkspecs/features/libraries.pri
Roland Winklmeier b16af78142 Load SimConnect dynamically at runtime.
Previously the FSX/P3D driver tried to link a very specific SimConnect version
from the Windows Assembly cache. This caused issues with machines
which did not have this specific version of SimConnect in the assembly
cache since drivers refused to load without much information. Having a different
version of SimConnect in the assembly cache or even in the bin folder did
not help.
To fix this problem, SimConnect is now loaded and resolved manually at
runtime. This allows to try loading different versions from the assembly
cache or prefer to load the shipped one.
For this, the manifests are linked into the binary's resource section and
activated manually before loading. This has the positive effect, that
loading errors can be handled by code instead of raising a cryptic error and
aborting.
2018-07-12 18:29:45 +02:00

92 lines
2.1 KiB
Plaintext

LIBS *= -L$$DestRoot/lib
unix:!macx {
# Set the rpath-link to find dependent shared libraries when linking
# Note: This does not add any rpath into the binaries.
LIBS += -Wl,-rpath-link,$$DestRoot/lib -Wl,-rpath-link,$$[QT_INSTALL_LIBS]
}
simulatorfsxcommon {
addStaticLibraryDependency(simulatorfsxcommon)
LIBS += -lsimulatorfsxcommon
}
simulatorfscommon {
addStaticLibraryDependency(simulatorfscommon)
LIBS += -lsimulatorfscommon
}
simulatorplugincommon {
addStaticLibraryDependency(simulatorplugincommon)
LIBS += -lsimulatorplugincommon
}
fsuipc {
addStaticLibraryDependency(fsuipc)
LIBS += -lfsuipc
}
simconnect {
DEFINES += SIMCONNECT_H_NOMANIFEST
equals(WORD_SIZE,64) {
INCLUDEPATH *= $$EXTERNALSROOT/common/include/simconnect/P3D-v4.1
LIBS *= -L$$EXTERNALS_LIB_DIR/P3D-v4.1
LIBS *= -lAdvapi32
LIBS += -ldxguid -lole32
# ole32 only needed for P3D on WIN64 systems, LNK2019: unresolved external symbol __imp_CoTaskMemFree referenced in function
# ldxguid are DirectX guid numbers
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
}
RC_FILE = $$SourceRoot/src/plugins/simulator/fsxcommon/simconnect.rc
msvc: QMAKE_LFLAGS *= /ignore:4099
}
blackgui {
addLibraryDependency(blackgui)
LIBS *= -lblackgui
}
blackcore {
addLibraryDependency(blackcore)
LIBS *= -lblackcore -lvatlib
}
blacksound {
LIBS *= -lblacksound
}
blackinput {
addLibraryDependency(blackinput)
LIBS *= -lblackinput
macx {
LIBS += -framework CoreFoundation -framework ApplicationServices -framework Foundation -framework AppKit
}
win32 {
LIBS *= -ldxguid -lole32 -ldinput8 -lUser32
}
}
blackmisc {
addLibraryDependency(blackmisc)
LIBS *= -lblackmisc
win32 {
LIBS *= -lShell32
}
}
blackconfig {
addStaticLibraryDependency(blackconfig)
LIBS *= -lblackconfig
}