mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-23 08:18:37 -05:00
Add support of "LINKER:" prefix for Windows executable creation
The following variables now support the LINKER: prefix: * CMAKE_<LANG>_CREATE_WIN32_EXE * CMAKE_<LANG>_CREATE_CONSOLE_EXE
This commit is contained in:
@@ -375,17 +375,17 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
|
||||
linkFlags, "CMAKE_EXE_LINKER_FLAGS", this->GeneratorTarget,
|
||||
cmBuildStep::Link, linkLanguage, this->GetConfigName());
|
||||
|
||||
if (this->GeneratorTarget->IsWin32Executable(
|
||||
this->Makefile->GetSafeDefinition("CMAKE_BUILD_TYPE"))) {
|
||||
{
|
||||
auto exeType =
|
||||
cmStrCat("CMAKE_", linkLanguage, "_CREATE_",
|
||||
(this->GeneratorTarget->IsWin32Executable(
|
||||
this->Makefile->GetDefinition("CMAKE_BUILD_TYPE"))
|
||||
? "WIN32"
|
||||
: "CONSOLE"),
|
||||
"_EXE");
|
||||
this->LocalGenerator->AppendFlags(
|
||||
linkFlags,
|
||||
this->Makefile->GetSafeDefinition(
|
||||
cmStrCat("CMAKE_", linkLanguage, "_CREATE_WIN32_EXE")));
|
||||
} else {
|
||||
this->LocalGenerator->AppendFlags(
|
||||
linkFlags,
|
||||
this->Makefile->GetSafeDefinition(
|
||||
cmStrCat("CMAKE_", linkLanguage, "_CREATE_CONSOLE_EXE")));
|
||||
linkFlags, this->Makefile->GetDefinition(exeType), exeType,
|
||||
this->GeneratorTarget, cmBuildStep::Link, linkLanguage);
|
||||
}
|
||||
|
||||
// Add symbol export flags if necessary.
|
||||
|
||||
Reference in New Issue
Block a user