Build: tag dev-only install rules with COMPONENT dev (#9287)

Headers under Code/RDGeneral/hash and the generated cmake package config
files (rdkit-config*.cmake, rdkit-targets*.cmake, rdkitpython-config*.cmake,
rdkitpython-targets*.cmake) are currently installed without an explicit
COMPONENT, so they default to "Unspecified" and cannot be cleanly separated
from runtime artifacts by packagers that use cmake's per-component install
(e.g. -DCMAKE_INSTALL_COMPONENT=dev).

In conda-forge we split the package into librdkit (runtime) and librdkit-dev
(headers + cmake config), with librdkit installing components
"Unspecified base data runtime" and librdkit-dev installing the "dev"
component. With the current upstream tagging, the hash headers and all
cmake config files end up in librdkit instead of librdkit-dev, which both
ships build-time artifacts in a runtime package and leaves librdkit-dev
without the cmake config needed for find_package(RDKit) to work.

This commit tags all five affected install() calls with COMPONENT dev so
per-component installs work correctly. Default (non-component) installs
are unaffected.
This commit is contained in:
Steven Kearnes
2026-05-21 13:16:05 -04:00
committed by GitHub
parent 1dfc9b7a1b
commit 169a1b2b67
2 changed files with 8 additions and 3 deletions

View File

@@ -55,7 +55,8 @@ rdkit_headers(Exceptions.h
DEST RDGeneral)
if (NOT RDK_INSTALL_INTREE)
install(DIRECTORY hash DESTINATION ${RDKit_HdrDir}/RDGeneral)
install(DIRECTORY hash DESTINATION ${RDKit_HdrDir}/RDGeneral
COMPONENT dev)
endif (NOT RDK_INSTALL_INTREE)
rdkit_catch_test(testDict testDict.cpp LINK_LIBRARIES RDGeneral)