fix vcxproj linker options
Commit 4bb004de94
broke the linker
options in generated Visual Studio projects.
We need to call fixLibFlags on QMAKE_LIBS and QMAKE_LIBS_PRIVATE.
Task-number: QTBUG-48936
Change-Id: I2f12bf0117d27104cd34f2f43fdeb7b948fa375e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
This commit is contained in:
parent
474bee61e4
commit
c66b492ced
@ -1207,12 +1207,13 @@ void VcprojGenerator::initLinkerTool()
|
||||
if (!project->values("DEF_FILE").isEmpty())
|
||||
conf.linker.ModuleDefinitionFile = project->first("DEF_FILE").toQString();
|
||||
|
||||
foreach (const ProString &libs, project->values("QMAKE_LIBS") + project->values("QMAKE_LIBS_PRIVATE")) {
|
||||
if (libs.left(9).toQString().toUpper() == "/LIBPATH:") {
|
||||
ProStringList l = ProStringList(libs);
|
||||
conf.linker.parseOptions(l);
|
||||
} else {
|
||||
conf.linker.AdditionalDependencies << escapeFilePath(libs.toQString());
|
||||
static const char * const lflags[] = { "QMAKE_LIBS", "QMAKE_LIBS_PRIVATE", 0 };
|
||||
for (int i = 0; lflags[i]; i++) {
|
||||
foreach (const ProString &lib, fixLibFlags(lflags[i])) {
|
||||
if (lib.startsWith("/LIBPATH:"))
|
||||
conf.linker.AdditionalLibraryDirectories << lib.mid(9).toQString();
|
||||
else
|
||||
conf.linker.AdditionalDependencies << lib.toQString();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user