diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2004-04-21 15:32:27 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2004-04-21 15:32:27 (GMT) |
commit | ac8232e140fdc934cff8895f5cca80fb8ab4d49f (patch) | |
tree | 0c2036f9e8a3d016c4adfecfae9c1f5b434e6b0d | |
parent | 4d55c6540a7e1416beaa4a780cf77a2d8ce14530 (diff) | |
download | CMake-ac8232e140fdc934cff8895f5cca80fb8ab4d49f.zip CMake-ac8232e140fdc934cff8895f5cca80fb8ab4d49f.tar.gz CMake-ac8232e140fdc934cff8895f5cca80fb8ab4d49f.tar.bz2 |
ENH: Do preinstall and postinstall script even if the target is not installed
-rw-r--r-- | Source/cmLocalGenerator.cxx | 20 |
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(); |