summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalGenerator.cxx
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2004-04-21 15:32:27 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2004-04-21 15:32:27 (GMT)
commitac8232e140fdc934cff8895f5cca80fb8ab4d49f (patch)
tree0c2036f9e8a3d016c4adfecfae9c1f5b434e6b0d /Source/cmLocalGenerator.cxx
parent4d55c6540a7e1416beaa4a780cf77a2d8ce14530 (diff)
downloadCMake-ac8232e140fdc934cff8895f5cca80fb8ab4d49f.zip
CMake-ac8232e140fdc934cff8895f5cca80fb8ab4d49f.tar.gz
CMake-ac8232e140fdc934cff8895f5cca80fb8ab4d49f.tar.bz2
ENH: Do preinstall and postinstall script even if the target is not installed
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r--Source/cmLocalGenerator.cxx20
1 files changed, 10 insertions, 10 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index c27e6af..5e9c25a 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -132,6 +132,12 @@ void cmLocalGenerator::GenerateInstallRules()
for(cmTargets::const_iterator l = tgts.begin();
l != tgts.end(); l++)
{
+ const char* preinstall = l->second.GetProperty("PRE_INSTALL_SCRIPT");
+ const char* postinstall = l->second.GetProperty("POST_INSTALL_SCRIPT");
+ if ( preinstall )
+ {
+ fout << "INCLUDE(\"" << preinstall << "\")" << std::endl;
+ }
if (l->second.GetInstallPath() != "")
{
destination = prefix + l->second.GetInstallPath();
@@ -139,12 +145,6 @@ void cmLocalGenerator::GenerateInstallRules()
const char* dest = destination.c_str();
int type = l->second.GetType();
- const char* preinstall = l->second.GetProperty("PRE_INSTALL_SCRIPT");
- const char* postinstall = l->second.GetProperty("POST_INSTALL_SCRIPT");
- if ( preinstall )
- {
- fout << "INCLUDE(\"" << preinstall << "\")" << std::endl;
- }
std::string fname;
const char* files;
@@ -242,10 +242,10 @@ void cmLocalGenerator::GenerateInstallRules()
default:
break;
}
- if ( postinstall )
- {
- fout << "INCLUDE(\"" << postinstall << "\")" << std::endl;
- }
+ }
+ if ( postinstall )
+ {
+ fout << "INCLUDE(\"" << postinstall << "\")" << std::endl;
}
}
cmMakefile* mf = this->GetMakefile();