This can be helpful if the upstream repository's CMakeLists.txt does not work well. Probably some mechanism to transparently specify a target for it would be necessary for this feature to be helpful:
[target.mylib]
type = "shared"
fetch-content = { git = "https://github.com/foo/mylib", tag = "v1.0" }
sources = ["src/mylib.cpp"] # implicitly ${mylib_SOURCE_DIR}/src/mylib.cpp
This would have to disable file checks and transparently convert globbing expressions into file(GLOB) commands. It is also important that the SOURCE_SUBDIR command is set to a non-existent directory to avoid runing the CMakeLists.txt.
This can be helpful if the upstream repository's CMakeLists.txt does not work well. Probably some mechanism to transparently specify a target for it would be necessary for this feature to be helpful:
This would have to disable file checks and transparently convert globbing expressions into
file(GLOB)commands. It is also important that theSOURCE_SUBDIRcommand is set to a non-existent directory to avoid runing theCMakeLists.txt.