diff options
author | Craig Scott <craig.scott@crascit.com> | 2019-07-22 11:03:13 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2019-07-22 11:04:00 (GMT) |
commit | 9e420754988caa86ebe8835b8fe2d24ff380a59e (patch) | |
tree | 3575907714cd9a1a5d97063840012a1ed0e41530 /Source | |
parent | f4131e4e1b5ac9ea8940a04b81e7b2ef2fba5d3f (diff) | |
parent | 5f96601675b7b4c1b8d609f31ce39ce35a96a1a5 (diff) | |
download | CMake-9e420754988caa86ebe8835b8fe2d24ff380a59e.zip CMake-9e420754988caa86ebe8835b8fe2d24ff380a59e.tar.gz CMake-9e420754988caa86ebe8835b8fe2d24ff380a59e.tar.bz2 |
Merge topic 'cpack-install-scripts'
5f96601675 CPack: Introduce CPACK_INSTALL_SCRIPTS variable
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3531
Diffstat (limited to 'Source')
-rw-r--r-- | Source/CPack/cmCPackGenerator.cxx | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx index 4a91698..350ebed 100644 --- a/Source/CPack/cmCPackGenerator.cxx +++ b/Source/CPack/cmCPackGenerator.cxx @@ -235,7 +235,7 @@ int cmCPackGenerator::InstallProject() return 0; } - // If the CPackConfig file sets CPACK_INSTALL_SCRIPT then run them + // If the CPackConfig file sets CPACK_INSTALL_SCRIPT(S) then run them // as listed if (!this->InstallProjectViaInstallScript(setDestDir, tempInstallDirectory)) { @@ -448,7 +448,19 @@ int cmCPackGenerator::InstallProjectViaInstalledDirectories( int cmCPackGenerator::InstallProjectViaInstallScript( bool setDestDir, const std::string& tempInstallDirectory) { - const char* cmakeScripts = this->GetOption("CPACK_INSTALL_SCRIPT"); + const char* cmakeScripts = this->GetOption("CPACK_INSTALL_SCRIPTS"); + { + const char* const cmakeScript = this->GetOption("CPACK_INSTALL_SCRIPT"); + if (cmakeScript && cmakeScripts) { + cmCPackLogger( + cmCPackLog::LOG_WARNING, + "Both CPACK_INSTALL_SCRIPTS and CPACK_INSTALL_SCRIPT are set, " + "the latter will be ignored." + << std::endl); + } else if (cmakeScript && !cmakeScripts) { + cmakeScripts = cmakeScript; + } + } if (cmakeScripts && *cmakeScripts) { cmCPackLogger(cmCPackLog::LOG_OUTPUT, "- Install scripts: " << cmakeScripts << std::endl); |