FIX: fixes bugs 1152 and 1154
This commit is contained in:
parent
b2592925a5
commit
712f4b3d01
|
@ -536,18 +536,6 @@ void cmLocalVisualStudio6Generator::SetBuildType(BuildType b,
|
||||||
std::string root= m_Makefile->GetRequiredDefinition("CMAKE_ROOT");
|
std::string root= m_Makefile->GetRequiredDefinition("CMAKE_ROOT");
|
||||||
const char *def= m_Makefile->GetDefinition( "MSPROJECT_TEMPLATE_DIRECTORY");
|
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)
|
if( def)
|
||||||
{
|
{
|
||||||
root = def;
|
root = def;
|
||||||
|
@ -611,8 +599,6 @@ void cmLocalVisualStudio6Generator::SetBuildType(BuildType b,
|
||||||
std::string line;
|
std::string line;
|
||||||
while(cmSystemTools::GetLineFromStream(fin, line))
|
while(cmSystemTools::GetLineFromStream(fin, line))
|
||||||
{
|
{
|
||||||
cmSystemTools::ReplaceString(line, "OUTPUT_LIBNAME_EXPORTS",
|
|
||||||
exportSymbol.c_str());
|
|
||||||
cmSystemTools::ReplaceString(line, "OUTPUT_LIBNAME",libName);
|
cmSystemTools::ReplaceString(line, "OUTPUT_LIBNAME",libName);
|
||||||
if (reg.find(line))
|
if (reg.find(line))
|
||||||
{
|
{
|
||||||
|
@ -996,7 +982,19 @@ void cmLocalVisualStudio6Generator::WriteDSPHeader(std::ostream& fout, const cha
|
||||||
staticLibOptions = libflags;
|
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;
|
std::string line;
|
||||||
while(cmSystemTools::GetLineFromStream(fin, line))
|
while(cmSystemTools::GetLineFromStream(fin, line))
|
||||||
{
|
{
|
||||||
|
@ -1005,6 +1003,8 @@ void cmLocalVisualStudio6Generator::WriteDSPHeader(std::ostream& fout, const cha
|
||||||
{
|
{
|
||||||
mfcFlag = "0";
|
mfcFlag = "0";
|
||||||
}
|
}
|
||||||
|
cmSystemTools::ReplaceString(line, "OUTPUT_LIBNAME_EXPORTS",
|
||||||
|
exportSymbol.c_str());
|
||||||
cmSystemTools::ReplaceString(line, "CMAKE_CUSTOM_RULE_CODE",
|
cmSystemTools::ReplaceString(line, "CMAKE_CUSTOM_RULE_CODE",
|
||||||
customRuleCode.c_str());
|
customRuleCode.c_str());
|
||||||
cmSystemTools::ReplaceString(line, "CMAKE_MFC_FLAG",
|
cmSystemTools::ReplaceString(line, "CMAKE_MFC_FLAG",
|
||||||
|
|
|
@ -55,7 +55,7 @@ RSC=rc.exe
|
||||||
# PROP Target_Dir ""
|
# PROP Target_Dir ""
|
||||||
# ADD BASE CPP /nologo /D "WIN32" /D "NDEBUG" /D "_LIB" /FD /c
|
# 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 /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
|
||||||
# ADD CPP CMAKE_CXX_FLAGS_RELEASE
|
# ADD CPP CMAKE_CXX_FLAGS_RELEASE
|
||||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||||
|
@ -83,7 +83,7 @@ CMAKE_CUSTOM_RULE_CODE
|
||||||
# PROP Target_Dir ""
|
# PROP Target_Dir ""
|
||||||
# ADD BASE CPP /nologo /D "WIN32" /D "_DEBUG" /D "_LIB" /FD /c
|
# 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 /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
|
||||||
# ADD CPP CMAKE_CXX_FLAGS_DEBUG
|
# ADD CPP CMAKE_CXX_FLAGS_DEBUG
|
||||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||||
|
@ -112,7 +112,7 @@ CMAKE_CUSTOM_RULE_CODE
|
||||||
# PROP Target_Dir ""
|
# PROP Target_Dir ""
|
||||||
# ADD BASE CPP /nologo /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_ATL_DLL" /FD /c
|
# 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 /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
|
||||||
# ADD CPP CMAKE_CXX_FLAGS_MINSIZEREL
|
# ADD CPP CMAKE_CXX_FLAGS_MINSIZEREL
|
||||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||||
|
@ -140,7 +140,7 @@ CMAKE_CUSTOM_RULE_CODE
|
||||||
# PROP Target_Dir ""
|
# PROP Target_Dir ""
|
||||||
# ADD BASE CPP /nologo /D "WIN32" /D "NDEBUG" /D "_LIB" /FD /c
|
# 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 /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
|
||||||
# ADD CPP CMAKE_CXX_FLAGS_RELWITHDEBINFO
|
# ADD CPP CMAKE_CXX_FLAGS_RELWITHDEBINFO
|
||||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||||
|
|
Loading…
Reference in New Issue