【问题标题】:cmake: How to include another project generated headercmake:如何包含另一个项目生成的标头
【发布时间】:2014-01-23 11:48:56
【问题描述】:

gflags 有 cmake-migration 分支,
它将在${buildir}/include 中生成标题,
如何包含生成的标题?
var 喜欢gflags_generated_headers 吗? 谢谢!

【问题讨论】:

    标签: cmake gflags


    【解决方案1】:

    您必须使用 Include_directories 命令包含整个目录。

    INCLUDE_DIRECTORIES(${buildir}/include)

    然后将特定文件的 Generated 属性设置为 True。

    set_source_files_properties(${buildir}/include/Myheader.h PROPERTIES GENERATED TRUE)

    【讨论】:

      猜你喜欢
      • 2023-03-17
      • 2019-05-14
      • 1970-01-01
      • 2011-08-22
      • 1970-01-01
      • 2010-11-29
      • 1970-01-01
      • 1970-01-01
      • 2012-07-20
      相关资源
      最近更新 更多