mirror of
https://github.com/reactos/CMake.git
synced 2025-02-28 07:55:55 +00:00
ENH: remove ifdef code and use makefile definitions
This commit is contained in:
parent
9cc69e8292
commit
26c08ee33b
@ -296,30 +296,30 @@ void cmLocalUnixMakefileGenerator::OutputMakefile(const char* file,
|
||||
|
||||
|
||||
|
||||
#if defined(_WIN32) && ! defined(__CYGWIN__)
|
||||
std::string cmLocalUnixMakefileGenerator::GetOutputExtension(const char* s)
|
||||
{
|
||||
std::string sourceExtension = s;
|
||||
if(sourceExtension == "def")
|
||||
if(m_Makefile->IsOn("WIN32") && !(m_Makefile->IsOn("CYGWIN") || m_Makefile->IsOn("MINGW")))
|
||||
{
|
||||
return "";
|
||||
std::string sourceExtension = s;
|
||||
if(sourceExtension == "def")
|
||||
{
|
||||
return "";
|
||||
}
|
||||
if(sourceExtension == "ico" || sourceExtension == "rc2")
|
||||
{
|
||||
return "";
|
||||
}
|
||||
if(sourceExtension == "rc")
|
||||
{
|
||||
return ".res";
|
||||
}
|
||||
return ".obj";
|
||||
}
|
||||
if(sourceExtension == "ico" || sourceExtension == "rc2")
|
||||
else
|
||||
{
|
||||
return "";
|
||||
return ".o";
|
||||
}
|
||||
if(sourceExtension == "rc")
|
||||
{
|
||||
return ".res";
|
||||
}
|
||||
return ".obj";
|
||||
}
|
||||
#else
|
||||
std::string cmLocalUnixMakefileGenerator::GetOutputExtension(const char*)
|
||||
{
|
||||
return ".o";
|
||||
}
|
||||
#endif
|
||||
|
||||
std::string cmLocalUnixMakefileGenerator::GetFullTargetName(const char* n,
|
||||
const cmTarget& t)
|
||||
@ -1051,19 +1051,21 @@ void cmLocalUnixMakefileGenerator::OutputSharedLibraryRule(std::ostream& fout,
|
||||
linkFlags += this->GetSafeDefinition(build.c_str());
|
||||
linkFlags += " ";
|
||||
}
|
||||
#ifdef _WIN32
|
||||
const std::vector<cmSourceFile*>& sources = t.GetSourceFiles();
|
||||
for(std::vector<cmSourceFile*>::const_iterator i = sources.begin();
|
||||
i != sources.end(); ++i)
|
||||
if(m_Makefile->IsOn("WIN32") && !(m_Makefile->IsOn("CYGWIN") || m_Makefile->IsOn("MINGW")))
|
||||
{
|
||||
if((*i)->GetSourceExtension() == "def")
|
||||
const std::vector<cmSourceFile*>& sources = t.GetSourceFiles();
|
||||
for(std::vector<cmSourceFile*>::const_iterator i = sources.begin();
|
||||
i != sources.end(); ++i)
|
||||
{
|
||||
linkFlags += this->GetSafeDefinition("CMAKE_LINK_DEF_FILE_FLAG");
|
||||
linkFlags += cmSystemTools::ConvertToOutputPath((*i)->GetFullPath().c_str());
|
||||
linkFlags += " ";
|
||||
if((*i)->GetSourceExtension() == "def")
|
||||
{
|
||||
linkFlags += this->GetSafeDefinition("CMAKE_LINK_DEF_FILE_FLAG");
|
||||
linkFlags += cmSystemTools::ConvertToOutputPath((*i)->GetFullPath().c_str());
|
||||
linkFlags += " ";
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
const char* targetPrefix = t.GetProperty("PREFIX");
|
||||
if(!targetPrefix)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user