假设项目的工程文件路径是/home/qwe/project/,项目需要引用一个公共库的xxx组件,路径是/home/qwe/publicLib/xxx
那么project里面的CMakeList.txt文件和xxx组件里面的CMakeList.txt需要怎么编写?
在ubuntu+vscode+esp-idf的编译环境中,怎么引用外部的库?
Re: 在ubuntu+vscode+esp-idf的编译环境中,怎么引用外部的库?
比如以 examples/protocols/esp_http_client/CMakeLists.txt 为例,可以用类似:
这样的方式添加路径在其他地方的 components。具体需要细看 https://docs.espressif.com/projects/esp ... ystem.html 里的内容。
Code: Select all
set(EXTRA_COMPONENT_DIRS $ENV{IDF_PATH}/examples/common_components/protocol_examples_common)
Who is online
Users browsing this forum: No registered users and 0 guests
