FIX: fixes bugs 1152 and 1154

This commit is contained in:
Bill Hoffman 2005-02-11 14:13:58 -05:00
parent b2592925a5
commit 712f4b3d01
2 changed files with 19 additions and 19 deletions

View File

@ -536,18 +536,6 @@ void cmLocalVisualStudio6Generator::SetBuildType(BuildType b,
std::string root= m_Makefile->GetRequiredDefinition("CMAKE_ROOT");
const char *def= m_Makefile->GetDefinition( "MSPROJECT_TEMPLATE_DIRECTORY");
std::string exportSymbol;
if (const char* custom_export_name = target.GetProperty("DEFINE_SYMBOL"))
{
exportSymbol = custom_export_name;
}
else
{
std::string in = libName;
in += "_EXPORTS";
exportSymbol = cmSystemTools::MakeCindentifier(in.c_str());
}
if( def)
{
root = def;
@ -611,8 +599,6 @@ void cmLocalVisualStudio6Generator::SetBuildType(BuildType b,
std::string line;
while(cmSystemTools::GetLineFromStream(fin, line))
{
cmSystemTools::ReplaceString(line, "OUTPUT_LIBNAME_EXPORTS",
exportSymbol.c_str());
cmSystemTools::ReplaceString(line, "OUTPUT_LIBNAME",libName);
if (reg.find(line))
{
@ -996,7 +982,19 @@ void cmLocalVisualStudio6Generator::WriteDSPHeader(std::ostream& fout, const cha
staticLibOptions = libflags;
}
}
std::string exportSymbol;
if (const char* custom_export_name = target.GetProperty("DEFINE_SYMBOL"))
{
exportSymbol = custom_export_name;
}
else
{
std::string in = libName;
in += "_EXPORTS";
exportSymbol = cmSystemTools::MakeCindentifier(in.c_str());
}
std::string line;
while(cmSystemTools::GetLineFromStream(fin, line))
{
@ -1005,6 +1003,8 @@ void cmLocalVisualStudio6Generator::WriteDSPHeader(std::ostream& fout, const cha
{
mfcFlag = "0";
}
cmSystemTools::ReplaceString(line, "OUTPUT_LIBNAME_EXPORTS",
exportSymbol.c_str());
cmSystemTools::ReplaceString(line, "CMAKE_CUSTOM_RULE_CODE",
customRuleCode.c_str());
cmSystemTools::ReplaceString(line, "CMAKE_MFC_FLAG",

View File

@ -55,7 +55,7 @@ RSC=rc.exe
# PROP Target_Dir ""
# ADD BASE CPP /nologo /D "WIN32" /D "NDEBUG" /D "_LIB" /FD /c
# ADD CPP /nologo /D "NDEBUG" /D "WIN32" /D "_LIB" /FD /c
# ADD CPP BUILD_INCLUDES EXTRA_DEFINES /D "OUTPUT_LIBNAME_EXPORTS"
# ADD CPP BUILD_INCLUDES EXTRA_DEFINES
# ADD CPP CMAKE_CXX_FLAGS
# ADD CPP CMAKE_CXX_FLAGS_RELEASE
# ADD BASE RSC /l 0x409 /d "NDEBUG"
@ -83,7 +83,7 @@ CMAKE_CUSTOM_RULE_CODE
# PROP Target_Dir ""
# ADD BASE CPP /nologo /D "WIN32" /D "_DEBUG" /D "_LIB" /FD /c
# ADD CPP /nologo /D "_DEBUG" /D "WIN32" /D "_LIB" /FD /GZ /c
# ADD CPP BUILD_INCLUDES EXTRA_DEFINES /D "OUTPUT_LIBNAME_EXPORTS"
# ADD CPP BUILD_INCLUDES EXTRA_DEFINES
# ADD CPP CMAKE_CXX_FLAGS
# ADD CPP CMAKE_CXX_FLAGS_DEBUG
# ADD BASE RSC /l 0x409 /d "_DEBUG"
@ -112,7 +112,7 @@ CMAKE_CUSTOM_RULE_CODE
# PROP Target_Dir ""
# ADD BASE CPP /nologo /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_ATL_DLL" /FD /c
# ADD CPP /nologo /D "NDEBUG" /D "_ATL_DLL" /D "WIN32" /D "_WINDOWS" /D "_USRDLL" /FD /c
# ADD CPP BUILD_INCLUDES EXTRA_DEFINES /D "OUTPUT_LIBNAME_EXPORTS"
# ADD CPP BUILD_INCLUDES EXTRA_DEFINES
# ADD CPP CMAKE_CXX_FLAGS
# ADD CPP CMAKE_CXX_FLAGS_MINSIZEREL
# ADD BASE RSC /l 0x409 /d "NDEBUG"
@ -140,7 +140,7 @@ CMAKE_CUSTOM_RULE_CODE
# PROP Target_Dir ""
# ADD BASE CPP /nologo /D "WIN32" /D "NDEBUG" /D "_LIB" /FD /c
# ADD CPP /nologo /D "NDEBUG" /D "WIN32" /D "_LIB" /FD /c
# ADD CPP BUILD_INCLUDES EXTRA_DEFINES /D "OUTPUT_LIBNAME_EXPORTS"
# ADD CPP BUILD_INCLUDES EXTRA_DEFINES
# ADD CPP CMAKE_CXX_FLAGS
# ADD CPP CMAKE_CXX_FLAGS_RELWITHDEBINFO
# ADD BASE RSC /l 0x409 /d "NDEBUG"