I have a cmake project leveraging another cmake library project, the dir looks like this:
/CMakeList.txt
/main.c
/.gitmodules
/patch/patch.c
/vendor/CMakeList.txt
/vendor/vendor.c
/vendor/...
In /CMakeList.txt
, I used add_subdirectory(vendor)
to include/link vendor library to my own project.
In /vendor/CMakeList.txt
, source file is added by FILE(GLOB SRC_VEN vendor.c ...)
I want to inject /patch/patch.c
into vendor
library without touching /vendor
directory, which is a git submodule
Is it possible to use cmake to achieve this in my root CMakeList.txt?
Thanks!