cmInstallScriptHandler: Now handles adding the component to install

This commit is contained in:
Robert Maynard committed 2026-03-05 10:06:01 -05:00
1 parent fbc91a7c7a
commit f059d95484
2 files changed
+5 -4

No files matched your search

+5
View File
@@ -47,6 +47,11 @@ cmInstallScriptHandler::cmInstallScriptHandler(std::string _binaryDir,
auto addScript = [this, &args](std::string script,
std::string config) -> void {
this->scripts.push_back({ script, config, args });
if (!this->component.empty()) {
this->scripts.back().command.insert(
this->scripts.back().command.end() - 1,
cmStrCat("-DCMAKE_INSTALL_COMPONENT=", this->component));
}
if (!config.empty()) {
this->scripts.back().command.insert(
this->scripts.back().command.end() - 1,
-4
View File
@@ -896,10 +896,6 @@ int do_install(int ac, char const* const* av)
args.emplace_back("-DCMAKE_INSTALL_PREFIX=" + prefix);
}
if (!component.empty()) {
args.emplace_back("-DCMAKE_INSTALL_COMPONENT=" + component);
}
if (strip) {
args.emplace_back("-DCMAKE_INSTALL_DO_STRIP=1");
}