ENH: Handle make install target on Visual Studio 6 and 7 and install templates
This commit is contained in:
parent
5c85e88bfd
commit
9ac968174e
|
@ -171,6 +171,11 @@ void cmGlobalVisualStudio6Generator::Generate()
|
|||
{
|
||||
gen[0]->GetMakefile()->
|
||||
AddUtilityCommand("ALL_BUILD", "echo","\"Build all projects\"",false,srcs);
|
||||
std::string cmake_command =
|
||||
m_LocalGenerators[0]->GetMakefile()->GetDefinition("CMAKE_COMMAND");
|
||||
gen[0]->GetMakefile()->
|
||||
AddUtilityCommand("INSTALL", cmake_command.c_str(),
|
||||
"-DBUILD_TYPE=$(IntDir) -P cmake_install.cmake",false,srcs);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -217,6 +222,7 @@ void cmGlobalVisualStudio6Generator::WriteDSWFile(std::ostream& fout,
|
|||
unsigned int i;
|
||||
bool doneAllBuild = false;
|
||||
bool doneRunTests = false;
|
||||
bool doneInstall = false;
|
||||
|
||||
for(i = 0; i < generators.size(); ++i)
|
||||
{
|
||||
|
@ -306,6 +312,17 @@ void cmGlobalVisualStudio6Generator::WriteDSWFile(std::ostream& fout,
|
|||
doneAllBuild = true;
|
||||
}
|
||||
}
|
||||
if(l->first == "INSTALL")
|
||||
{
|
||||
if(doneInstall)
|
||||
{
|
||||
skip = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
doneInstall = true;
|
||||
}
|
||||
}
|
||||
if(l->first == "RUN_TESTS")
|
||||
{
|
||||
if(doneRunTests)
|
||||
|
|
|
@ -256,6 +256,11 @@ void cmGlobalVisualStudio7Generator::Generate()
|
|||
{
|
||||
gen[0]->GetMakefile()->
|
||||
AddUtilityCommand("ALL_BUILD", "echo","\"Build all projects\"",false,srcs);
|
||||
std::string cmake_command =
|
||||
m_LocalGenerators[0]->GetMakefile()->GetDefinition("CMAKE_COMMAND");
|
||||
gen[0]->GetMakefile()->
|
||||
AddUtilityCommand("INSTALL", cmake_command.c_str(),
|
||||
"-DBUILD_TYPE=$(IntDir) -P cmake_install.cmake",false,srcs);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -314,6 +319,7 @@ void cmGlobalVisualStudio7Generator::WriteSLNFile(std::ostream& fout,
|
|||
homedir += "/";
|
||||
bool doneAllBuild = false;
|
||||
bool doneRunTests = false;
|
||||
bool doneInstall = false;
|
||||
|
||||
// For each cmMakefile, create a VCProj for it, and
|
||||
// add it to this SLN file
|
||||
|
@ -407,6 +413,17 @@ void cmGlobalVisualStudio7Generator::WriteSLNFile(std::ostream& fout,
|
|||
doneAllBuild = true;
|
||||
}
|
||||
}
|
||||
if(l->first == "INSTALL")
|
||||
{
|
||||
if(doneInstall)
|
||||
{
|
||||
skip = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
doneInstall = true;
|
||||
}
|
||||
}
|
||||
if(l->first == "RUN_TESTS")
|
||||
{
|
||||
if(doneRunTests)
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# just install the modules
|
||||
INSTALL_PROGRAMS(${CMAKE_DATA_DIR}/Templates install-sh)
|
||||
INSTALL_FILES(${CMAKE_DATA_DIR}/Templates .*\\.cmake$)
|
||||
INSTALL_FILES(${CMAKE_DATA_DIR}/Templates .*\\.dsptemplate$)
|
||||
|
||||
|
|
Loading…
Reference in New Issue