V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  trafalgarTaw  ›  全部回复第 1 页 / 共 1 页
回复总数  1
203 天前
回复了 cppc 创建的主题 C 不熟悉 cmake,请教一下多模块项目的 cmake 写法
subdirectory, 顶层 CMakeLists.txt 包含 app 和 lib-example 两个 subdirectory , 然后 lib-example 的 subdirectory 在前, 头文件路径什么的根路径设置好, 然后在 app 的 CMakeLists.txt 里添加一下就行了吧。 参照下 gtest 的 CMakeLists.txt 。 我只知道可以这样做可以, 也没了解过有没有更好的做法。
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   4986 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 10ms · UTC 09:57 · PVG 17:57 · LAX 02:57 · JFK 05:57
Developed with CodeLauncher
♥ Do have faith in what you're doing.