Is there are way to read dependencies of cmake built library?

Hi, I’m trying to use a cmake-ninja built library from another buildsystem.

the problem is that, my cmake library internally built with vcpkg.
which means that the library depends on several other libraries.

currently what I do is that build the cmake library using command line in a another buildsystem
and link dependencies based on manually written path, cause I know paths anyway.

but I’d like to read dependencies, that library dependent, programmable way.
not the way manually writing paths in a buildsystem.
is there are some kind of cmake command or cmake code to use for this kind of purpose?

please don’t suggests me that unify build system with cmake(while I really do like to do), cause it is not possible.

Perhaps CMake file-api? This is a standalone example that queries file-api for target information including libraries linked to each target.

Thanks a lot! I knew there are something! It seems bit complex api than i thought though haha.
I’ll look it up!

Yeah, the file API is a bit complex to read but it’s meant to be used programmatically and is used by a number of significant programs like IDEs.