Skip to content

"cmake -DMBEDTLS_CONFIG_FILE" does not *install* the specified mbedtls_config.h #9947

Open
@byron-hawkins

Description

@byron-hawkins

Summary

In cmake, option -DMBEDTLS_CONFIG_FILE=my_mbedtls_config.h makes that file take the place of include/mbedtls/mbedtls_config.h. However, during cmake install, the override is ignored and the original include/mbedtls/mbedtls_config.h is copied into the build area.

System information

Mbed TLS version (number or commit id): 2ca6c285a0dd3f33982dd57299012dacab1ff206 (though no change is apparent on the default development branch)
Operating system and version: Fedora 41
Configuration (if not default, please attach mbedtls_config.h): (not relevant)
Compiler and options (if you used a pre-built binary, please indicate how you obtained it): (not relevant)
Additional environment information:

Expected behavior

When the user specifies an alternative mbedtls_config.h, it should not only be used in the build, but also be installed. Otherwise the mbedtls_config.h in the installed includes is not consistent with the build it corresponds to.

Actual behavior

cmake copies the original include/mbedtls/mbedtls_config.h instead of the one that was actually used to produce the corresponding build.

Steps to reproduce

Set flag -DMBEDTLS_CONFIG_FILE to any file other than include/mbedtls/mbedtls_config.h and observe that in fact it is the latter file which is installed, not the former.

Additional information

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugcomponent-platformPortability layer and build scriptshelp-wantedThis issue is not being actively worked on, but PRs welcome.

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions