how to add a ncs/nrf library to my project

For example, I'd like to add at_cmd_parser to my project. It's under /ncs/nrf/lib/at_cmd_parser.

My project is out-of-tree in its own directory. Initially I tried add to CMakeLists.txt something like this: add_subdirectory(../../../../ncs/nrf/lib/at_cmd_parser). It doesn;t work because it's not a direct sub directory. And the absolute path is not desired.

So what is the right way to do it? Other than directly copy those C files into my project?

Thanks!

Related