Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Component core included globally and also in header mode #4283

Open
wsxarcher opened this issue Jan 2, 2025 · 1 comment
Open

Component core included globally and also in header mode #4283

wsxarcher opened this issue Jan 2, 2025 · 1 comment

Comments

@wsxarcher
Copy link

wsxarcher commented Jan 2, 2025

When using fmt in header mode in my project and using cpack to create an installer, fmt core component gets detected as a component to make into the installer even if it's not needed.

add_subdirectory(fmt)
target_link_libraries(test
                       fmt::fmt-header-only

To remove the component from cpack I needed to do this in my cpack settings.

get_cmake_property(CPACK_COMPONENTS_ALL COMPONENTS)
list(REMOVE_ITEM CPACK_COMPONENTS_ALL "core") # remove fmtlib lib component (core)

Maybe would be better to call it fmtlib_core as components in cmake are global when included as subdirectory (?).
And if possible the component name should not be included when using in header mode.

(Related to #4276)

@vitaut
Copy link
Contributor

vitaut commented Jan 2, 2025

The header-only mode is not recommended and we shouldn't change install behavior based on it but a PR to rename the component to fmt-core is welcome (fmtlib is the name of the github org, not the project). I think it can be done unconditionally since the name is global.

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

No branches or pull requests

2 participants