building/referencing a library

Hi, all -

Brand new to using CMake.

I need to port an RTP library to a new platform (the Espressif ESP32). I pulled a copy of ortp from github. It depends on bctoolbox (from the same author), which in turn depends on mbedtls.

The bctoolbox path is (Windows) C:\esp32-projects\ortp.
The mbedtls (furnished by Espressif) path for source is C:\esp-idf\components\mbedtls.
The mbedls path for the binary is C:\esp32-projects\ortp\build\esp-idf\mbedtls.

So I’ve looked at the documentation, and found the add_library command. Is this the appropriate way to make bctoolbox “aware” of this library? It seems like the right command, but it also seems kind of odd that I’d have to list all the source files in this directory structure.

Or…am I doing this totally wrong?

Thanks for any clarification.