diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2004-03-28 01:59:44 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2004-03-28 01:59:44 (GMT) |
commit | db68c543ff7ee0a59ec5fa463f59255193a9a479 (patch) | |
tree | e7311dabbedcdb504bf38a9b7fdb3a0ed8791ddc /Source | |
parent | 451522381d510c02185ac8bfb75c3aa93b863fb4 (diff) | |
download | CMake-db68c543ff7ee0a59ec5fa463f59255193a9a479.zip CMake-db68c543ff7ee0a59ec5fa463f59255193a9a479.tar.gz CMake-db68c543ff7ee0a59ec5fa463f59255193a9a479.tar.bz2 |
ENH: Add pre and post install script support
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmLocalGenerator.cxx | 11 | ||||
-rw-r--r-- | Source/cmSetTargetPropertiesCommand.h | 4 |
2 files changed, 14 insertions, 1 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index eea1b17..bac89cc 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -130,6 +130,13 @@ 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; // now install the target @@ -226,6 +233,10 @@ void cmLocalGenerator::GenerateInstallRules() default: break; } + if ( postinstall ) + { + fout << "INCLUDE(" << postinstall << ")" << std::endl; + } } } cmMakefile* mf = this->GetMakefile(); diff --git a/Source/cmSetTargetPropertiesCommand.h b/Source/cmSetTargetPropertiesCommand.h index a6dacf0..726e434 100644 --- a/Source/cmSetTargetPropertiesCommand.h +++ b/Source/cmSetTargetPropertiesCommand.h @@ -62,7 +62,9 @@ public: "systems and libraries. CMake also knows about LINK_FLAGS, which " "can be used to add extra flags to the link step of a target." "DEFINE_SYMBOL is a symbol that is defined when compiling C or C++ " - "sources. " + "sources. PRE_INSTALL_SCRIPT specifies CMake script that is run " + "prior to installing the target. POST_INSTALL_SCRIPT specifies " + "CMake script that is run after target is installed. " "If not set here then it is set to target_EXPORTS by default " "(with some substitutions if target is not a valid C identifier). " "You can use and prop value pair you want and extract it later with " |