Skip to content

CMake: Add option ENABLE_INSTALL - #351

Merged
thiagomacieira merged 1 commit into
intel:mainfrom
suda-morris:cmake-add-enable-install
Oct 28, 2026
Merged

thiagomacieira merged 1 commit into
intel:mainfrom
suda-morris:cmake-add-enable-install

Conversation

@suda-morris

@suda-morris suda-morris commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Add ENABLE_INSTALL (default ON) so embedders using add_subdirectory() / FetchContent can skip TinyCBOR's install rules.
  • Route every install() through a tinycbor_install helper (headers, pkgconfig, export, tools)
  • Standalone cmake --install is unchanged.

When TinyCBOR is pulled in as a subdirectory, its install() commands write into the parent prefix. install(EXPORT) can also fail if the tinycbor target inherited LINK_LIBRARIES from the parent: those targets are not in TinyCBOR's export set.

install() always ran, including install(EXPORT). Embedders that
add_subdirectory() TinyCBOR then write headers into the parent
prefix, and CMake may refuse the export when the tinycbor target
inherited foreign LINK_LIBRARIES.

Route every install() through tinycbor_install so the option can
skip those rules. Default is ON.
@thiagomacieira
thiagomacieira merged commit 0cb8ba9 into intel:main Oct 28, 2026
9 checks passed
@suda-morris
suda-morris deleted the cmake-add-enable-install branch October 29, 2026 03:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants