Skip to content

Add [target].fetch-content support for easy vendoring #161

@mrexodia

Description

@mrexodia

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions