Define _WINDLL when building a DLL
Visual Studio automatically defines _WINDLL when building a DLL, regardless of project settings (https://msdn.microsoft.com/en-us/library/8x480de8.aspx). This define is therefore widely used to detect DLL vs. static library or executable build target on Windows. For makefiles, _WINDLL need to be manually defined, which QMake failed to do so far. Task-number: QTBUG-55183 Change-Id: Ic62201666c44e730e6881706d568ce9eaf22b7a4 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
This commit is contained in:
parent
0681e60380
commit
b6f5b38f8c
@ -426,6 +426,12 @@ void NmakeMakefileGenerator::init()
|
|||||||
if (!defines.contains("NDEBUG"))
|
if (!defines.contains("NDEBUG"))
|
||||||
defines.append("NDEBUG");
|
defines.append("NDEBUG");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (project->values("QMAKE_APP_FLAG").isEmpty() && project->isActiveConfig("dll")) {
|
||||||
|
ProStringList &defines = project->values("DEFINES");
|
||||||
|
if (!defines.contains("_WINDLL"))
|
||||||
|
defines.append("_WINDLL");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QStringList NmakeMakefileGenerator::sourceFilesForImplicitRulesFilter()
|
QStringList NmakeMakefileGenerator::sourceFilesForImplicitRulesFilter()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user