Skip to content

Component core included globally and also in header mode #4283

@wsxarcher

Description

@wsxarcher

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions