设置CMakeLists以不更改Android Studio中TFS项目的include语句 [英] Set up CMakeLists to not change the include statements from TFS project in Android Studio

查看:253
本文介绍了设置CMakeLists以不更改Android Studio中TFS项目的include语句的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

来自以前的问题出现了一个新的。我想要包含两个存储在两个不同文件夹中的本机TFS项目库,这些文件库在我的Android Studio项目中相互依赖(存储在另一个文件夹中)。如果我没有指定../my_lib_path/libFile.h而不是简单的libFile.h我得到错误,找不到文件。但我不想更改所有包含,因为它是一个TFS项目,并且库中包含大量文件!

From a previous question a new one have arisen. I want to include 2 native TFS project libraries stored in two different folders, dependant from each other in my Android Studio project (stored in another folder). If i not specify "../my_lib_path/libFile.h" instead of simply the "libFile.h" i get the error the file is not found. But i dont want to change all includes since it is a TFS project and there are lots of file contained in the libraries!

非常感谢您的帮助!

推荐答案

将给定目录添加到编译器用于搜索包含文件的目录中。相对路径被解释为相对于当前源目录。所以你必须指定../my_lib_path/libFile.h,这意味着你需要更改所有包含,否则它将无法工作。

Add the given directories to those the compiler uses to search for include files. Relative paths are interpreted as relative to the current source directory. So you have to specify "../my_lib_path/libFile.h", that means you need to change all includes, otherwise it will not work.

这篇关于设置CMakeLists以不更改Android Studio中TFS项目的include语句的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆