diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index 3f41a99bea..cbc8fd56ff 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -268,8 +268,7 @@ void cmMakefileTargetGenerator::WriteTargetLanguageFlags() // Add the export symbol definition for shared library objects. if(const char* exportMacro = this->Target->GetExportMacro()) { - flags += "-D"; - flags += exportMacro; + this->LocalGenerator->AppendDefines(defines, exportMacro, lang); } // Add preprocessor definitions for this target and configuration.