博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Cmake environmental variables: how to make find_package, find_path and find_library work
阅读量:2442 次
发布时间:2019-05-10

本文共 2325 字,大约阅读时间需要 7 分钟。

Environment Variables

These are environment variables which effect cmake behaviour.

CMAKE_INCLUDE_PATH 
This is used when searching for include files e.g. using the FIND_PATH() command. If you have headers in non-standard locations, it may be useful to set this variable to this directory (e.g. 
/sw/include on Mac OS X). If you need several directories, separate them by the platform specific separators (e.g. ":" on UNIX)
CMAKE_LIBRARY_PATH 
This is used when searching for libraries e.g. using the FIND_LIBRARY() command. If you have libraries in non-standard locations, it may be useful to set this variable to this directory (e.g. 
/sw/lib on Mac OS X). If you need several directories, separate them by the platform specific separators (e.g. ":" on UNIX)
CMAKE_PREFIX_PATH 
(since CMake 
2.6.0) This is used when searching for include files, binaries, or libraries using either the FIND_PACKAGE(), FIND_PATH(), FIND_PROGRAM(), or FIND_LIBRARY() commands. For each path in the CMAKE_PREFIX_PATH list, CMake will check "PATH/include" and "PATH" when FIND_PATH() is called, "PATH/bin" and "PATH" when FIND_PROGRAM() is called, and "PATH/lib" and "PATH" when FIND_LIBRARY() is called. See the documentation for FIND_PACKAGE(), FIND_LIBRARY(), FIND_PATH(), and FIND_PROGRAM() for more details.
CMAKE_INSTALL_ALWAYS 
If set during installation CMake will install all files whether they have changed or not. The default when this is not set is to install only files that have changed since the previous installation. In both cases all files are reported to indicate CMake knows they are up to date in the installed location.
$ENV{name} 
This is not an environment variable , but this is how you can access environment variables from cmake files. It returns the content of the environment variable with the given name (e.g. 
$ENV{PROGRAMFILES})
DESTDIR 
If this environment variable is set it will be prefixed to CMAKE_INSTALL_PREFIX in places where it is used to access files during installation. This allows the files to be installed in an intermediate directory tree without changing the final installation path name. Since the value of CMAKE_INSTALL_PREFIX may be included in installed files it is important to use DESTDIR rather than changing CMAKE_INSTALL_PREFIX when it is necessary to install to a intermediate staging directory.

转载地址:http://ftiqb.baihongyu.com/

你可能感兴趣的文章
使用codeigniter_使用CodeIgniter探索面向方面的编程,第2部分
查看>>
用Wufoo创建简单表单:开发人员的观点
查看>>
heroku_使用Heroku和Facebook SDK在云中构建您的应用
查看>>
SitePoint播客#145:Addy Osmani的Backbone.js基础
查看>>
Google发布Chrome 4.0
查看>>
将ip保存在txt文档中_将任何文件存储在Google文档中
查看>>
disconf apps_Google Apps Drop IE6支持
查看>>
使用Screenr创建截屏视频
查看>>
微信小程序使用flex布局_使用Flex来启动您PHP应用程序!
查看>>
互联网总线带宽_新技术将使互联网带宽翻倍
查看>>
java自由职业者是什么_一个成功的自由职业者需要什么?
查看>>
paas云平台架构_PaaS:通过Node.js中的RESTful API管理您的云基础架构
查看>>
HTML完整格式–什么是HTML完整格式?
查看>>
java开发持久层_Java与软件开发保持同步以确保持久流行
查看>>
Angular vs React – Angular和React之间的区别
查看>>
有源蜂鸣器驱动程序_Windows 10现在处于8.25亿有源设备上:这对程序员意味着什么
查看>>
oracle认证考试_通过获得Oracle助理认证来提升您的职业-PrepAway进行的1Z0-052考试复习
查看>>
java语言作为入门好吗_Java作为学生的第一语言
查看>>
sql内联接外联接三张表_在SQL中联接三个或更多表
查看>>
数据科学 python_Python如何帮助数据科学专业人员
查看>>