mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-09-25 04:09:36 +03:00
install(PACKAGE_INFO): Record COMPONENT in global COMPONENTS list
Fixes: #27249
This commit is contained in:
@@ -2205,6 +2205,11 @@ bool HandlePackageInfoMode(std::vector<std::string> const& args,
|
||||
cmInstallGenerator::MessageLevel message =
|
||||
cmInstallGenerator::SelectMessageLevel(helper.Makefile);
|
||||
|
||||
// Tell the global generator about any installation component names
|
||||
// specified
|
||||
helper.Makefile->GetGlobalGenerator()->AddInstallComponent(
|
||||
ica.GetComponent());
|
||||
|
||||
// Create the export install generator.
|
||||
helper.Makefile->AddInstallGenerator(
|
||||
cm::make_unique<cmInstallPackageInfoExportGenerator>(
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
-- COMPONENTS='Unspecified;cps'
|
||||
@@ -0,0 +1,6 @@
|
||||
add_library(foo INTERFACE)
|
||||
|
||||
install(TARGETS foo EXPORT foo DESTINATION .)
|
||||
install(PACKAGE_INFO foo DESTINATION cps EXPORT foo COMPONENT cps)
|
||||
get_cmake_property(components COMPONENTS)
|
||||
message(STATUS "COMPONENTS='${components}'")
|
||||
@@ -38,6 +38,7 @@ run_cmake(DependsMultipleDifferentSets)
|
||||
|
||||
# Test functionality
|
||||
run_cmake(Appendix)
|
||||
run_cmake(Component)
|
||||
run_cmake(InterfaceProperties)
|
||||
run_cmake(Metadata)
|
||||
run_cmake(ProjectMetadata)
|
||||
|
||||
Reference in New Issue
Block a user