summaryrefslogtreecommitdiffstats
path: root/Source/cmDSPMakefile.cxx
diff options
context:
space:
mode:
authorGeoffrey Cross <geoff@cross.lu>2001-05-10 18:30:16 (GMT)
committerGeoffrey Cross <geoff@cross.lu>2001-05-10 18:30:16 (GMT)
commit978407e0428919365208dad175e4b953ffc3af99 (patch)
treeb3706e1b512ddbcda0f3db425585778c2aa78185 /Source/cmDSPMakefile.cxx
parent8b24163d278653a68710b216522715b76982ee5d (diff)
downloadCMake-978407e0428919365208dad175e4b953ffc3af99.zip
CMake-978407e0428919365208dad175e4b953ffc3af99.tar.gz
CMake-978407e0428919365208dad175e4b953ffc3af99.tar.bz2
Reads and uses MSPROJECT_TEMPLATE_DIRECTORY if it exists
Diffstat (limited to 'Source/cmDSPMakefile.cxx')
-rw-r--r--Source/cmDSPMakefile.cxx45
1 files changed, 29 insertions, 16 deletions
diff --git a/Source/cmDSPMakefile.cxx b/Source/cmDSPMakefile.cxx
index b2001d3..fba87f5 100644
--- a/Source/cmDSPMakefile.cxx
+++ b/Source/cmDSPMakefile.cxx
@@ -358,37 +358,50 @@ void cmDSPMakefile::WriteDSPEndGroup(std::ostream& fout)
void cmDSPMakefile::SetBuildType(BuildType b, const char *libName)
{
+ std::string root= m_Makefile->GetHomeDirectory();
+ const char *def= m_Makefile->GetDefinition( "MSPROJECT_TEMPLATE_DIRECTORY");
+
+ if( def)
+ {
+ root = def;
+ }
+ else
+ {
+ root += "/CMake/Source";
+ }
+
switch(b)
{
case STATIC_LIBRARY:
- m_DSPHeaderTemplate = m_Makefile->GetHomeDirectory();
- m_DSPHeaderTemplate += "/CMake/Source/staticLibHeader.dsptemplate";
- m_DSPFooterTemplate = m_Makefile->GetHomeDirectory();
- m_DSPFooterTemplate += "/CMake/Source/staticLibFooter.dsptemplate";
+ m_DSPHeaderTemplate = root;
+ m_DSPHeaderTemplate += "/staticLibHeader.dsptemplate";
+ m_DSPFooterTemplate = root;
+ m_DSPFooterTemplate += "/staticLibFooter.dsptemplate";
break;
case DLL:
- m_DSPHeaderTemplate = m_Makefile->GetHomeDirectory();
- m_DSPHeaderTemplate += "/CMake/Source/DLLHeader.dsptemplate";
- m_DSPFooterTemplate = m_Makefile->GetHomeDirectory();
- m_DSPFooterTemplate += "/CMake/Source/DLLFooter.dsptemplate";
+ m_DSPHeaderTemplate = root;
+ m_DSPHeaderTemplate += "/DLLHeader.dsptemplate";
+ m_DSPFooterTemplate = root;
+ m_DSPFooterTemplate += "/DLLFooter.dsptemplate";
break;
case EXECUTABLE:
- m_DSPHeaderTemplate = m_Makefile->GetHomeDirectory();
- m_DSPHeaderTemplate += "/CMake/Source/EXEHeader.dsptemplate";
- m_DSPFooterTemplate = m_Makefile->GetHomeDirectory();
- m_DSPFooterTemplate += "/CMake/Source/EXEFooter.dsptemplate";
+ m_DSPHeaderTemplate = root;
+ m_DSPHeaderTemplate += "/EXEHeader.dsptemplate";
+ m_DSPFooterTemplate = root;
+ m_DSPFooterTemplate += "/EXEFooter.dsptemplate";
break;
case UTILITY:
- m_DSPHeaderTemplate = m_Makefile->GetHomeDirectory();
- m_DSPHeaderTemplate += "/CMake/Source/UtilityHeader.dsptemplate";
- m_DSPFooterTemplate = m_Makefile->GetHomeDirectory();
- m_DSPFooterTemplate += "/CMake/Source/UtilityFooter.dsptemplate";
+ m_DSPHeaderTemplate = root;
+ m_DSPHeaderTemplate += "/UtilityHeader.dsptemplate";
+ m_DSPFooterTemplate = root;
+ m_DSPFooterTemplate += "/UtilityFooter.dsptemplate";
break;
}
// once the build type is set, determine what configurations are
// possible
std::ifstream fin(m_DSPHeaderTemplate.c_str());
+
cmRegularExpression reg("# Name ");
if(!fin)
{