Skip to content

Add cmake_file_name_variants support for CMakeConfigDeps#19530

Merged
memsharded merged 13 commits into
conan-io:develop2from
AbrilRBS:ar/comakeocnfigdeps-lowercase-non-fallback
Feb 12, 2026
Merged

Add cmake_file_name_variants support for CMakeConfigDeps#19530
memsharded merged 13 commits into
conan-io:develop2from
AbrilRBS:ar/comakeocnfigdeps-lowercase-non-fallback

Conversation

@AbrilRBS

@AbrilRBS AbrilRBS commented Jan 29, 2026

Copy link
Copy Markdown
Member

Changelog: Feature: Add cmake_file_name_variants support to CMakeConfigDeps to allow packages to define additional lower/upper-case variants that consumers may use when calling find_package.
Docs: conan-io/docs#4384

Comment thread conan/tools/cmake/cmakeconfigdeps/cmakeconfigdeps.py Outdated
@AbrilRBS AbrilRBS added this to the 2.26.0 milestone Jan 29, 2026
@AbrilRBS AbrilRBS requested a review from jcar87 January 29, 2026 12:51
@AbrilRBS AbrilRBS changed the title Add failing test for CMakeConfigDeps casing fallback Add cmake_extra_find_casing_names support for CMakeConfigDeps Jan 29, 2026
Comment thread conan/tools/cmake/cmakeconfigdeps/cmakeconfigdeps.py Outdated
Comment thread conan/tools/cmake/cmakeconfigdeps/cmakeconfigdeps.py Outdated
Comment thread conan/tools/cmake/cmakeconfigdeps/cmakeconfigdeps.py Outdated
Comment thread conan/tools/cmake/cmakeconfigdeps/cmakeconfigdeps.py Outdated

@memsharded memsharded left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now the implementation is looking better.

But I still wonder if too much. The use case for this is extremely niche. Just a couple of recipes from ConanCenter. What is the effect of creating the extra casing xxx_DIR even if the user did the override? They won't be used, but nothing will change?

Maybe not, and it is good as-is, just wondering, I have this feeling when CMakeDeps accumulated also a lot of things and maintenance became complicated.

@AbrilRBS AbrilRBS requested a review from czoido February 2, 2026 13:04
@czoido

czoido commented Feb 2, 2026

Copy link
Copy Markdown
Contributor

I'm ok with the name of the config but maybe it's a bit long, some alternatives could be:

  • cmake_find_package_casings
  • cmake_find_name_casings

but It's not that I love any of these too...

@AbrilRBS AbrilRBS changed the title Add cmake_extra_find_casing_names support for CMakeConfigDeps Add cmake_file_name_variants support for CMakeConfigDeps Feb 10, 2026
@memsharded memsharded merged commit 92c8ea5 into conan-io:develop2 Feb 12, 2026
16 checks passed
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.

3 participants