FetchContent_MakeAvailable() does not pass FIND_PACKAGE_ARGS to dependency provider
FetchContent_MakeAvailable()
contains code to pass the FIND_PACKAGE_ARGS ...
to the FETCHCONTENT_MAKEAVAILABLE_SERIAL
dependency provider, if one was set (and the documentation in Help/command/cmake_language.rst hints at this behaviour, although it doesn't explicitly mention it), but it looks like a typo prevents it from working:
diff --git a/Modules/FetchContent.cmake b/Modules/FetchContent.cmake
index 1038585b5b..72933139d7 100644
--- a/Modules/FetchContent.cmake
+++ b/Modules/FetchContent.cmake
@@ -1975,12 +1975,12 @@ macro(FetchContent_MakeAvailable)
# This property might be defined but empty. As long as it is defined,
# find_package() can be called.
get_property(__cmake_addfpargs GLOBAL PROPERTY
- _FetchContent_${contentNameLower}_find_package_args
+ _FetchContent_${__cmake_contentNameLower}_find_package_args
DEFINED
)
if(__cmake_addfpargs)
get_property(__cmake_fpargs GLOBAL PROPERTY
- _FetchContent_${contentNameLower}_find_package_args
+ _FetchContent_${__cmake_contentNameLower}_find_package_args
)
string(APPEND __cmake_providerArgs " FIND_PACKAGE_ARGS")
foreach(__cmake_item IN LISTS __cmake_fpargs)