CMake Notes
CMake 学习资料
- https://eliasdaler.github.io/using-cmake/
- https://github.com/kigster/cmake-project-template 找一个模板项目作为参考
External Project
基本就是先添加ExternalProject_add,然后add_library指定IMPORTED,设置import路径。最后使用的时候额外增加一个add_dependencies关联到ExternalProject_add的target。
- https://cmake.org/cmake/help/latest/module/ExternalProject.html
- https://stackoverflow.com/questions/51564251/correct-way-to-use-third-party-libraries-in-cmake-project/51567322#51567322
- https://stackoverflow.com/questions/51661637/having-cmake-build-but-not-install-an-external-project
- https://stackoverflow.com/questions/29533159/what-is-install-dir-useful-for-in-externalproject-add-command
- ninja报错找不到import的库的构建方法: https://stackoverflow.com/questions/50400592/using-an-externalproject-download-step-with-ninja