当前位置:网站首页>Cmake常用命令总结
Cmake常用命令总结
2022-07-26 11:00:00 【AutoGalaxy】
1. PROJECT_SOURCE_DIR路径(CmakeList文件所在文件夹的路径):

2. 设置输出可执行文件存放路径
![]()
3. 设置 输出库的存放路径
CMAKE_LIBRARY_OUTPUT_DIRECTORY:
4. list的用法
建议参考下面这篇文章
(1)大型工程寻找库文件,一般习惯单独创建一个与cmakelists.txt文件同级的文件夹,一般命名为cmake_moudles之类的,里面存放的是各种.cmake文件,用来寻找库,就是指定头文件和库文件,以及包名
(2)可以这样理解:使用下述代码用来把cmake_moudles文件里面的.cmake文件内容照搬到本cmakelists.txt文件
list(APPENDE CMAKE_MOUDLE_PATH "${PROJECT_SOURCE_DIR}/cmake_moules")还可以使用:
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake_modules)
边栏推荐
- pytest conftest.py和fixture的配合使用
- List and dictionary instance applications (※)
- A new technical director asked me to do an IP territorial function~
- 3Dunity游戏项目实战——飞机大战
- logging 高级使用
- In depth interpretation of happens before principle
- MySQL basic knowledge summary
- 菜鸟看源码之LinkedBlockingQueue
- Esxi6.5 patch update
- [学习进度]5月
猜你喜欢
随机推荐
Access rights - private, public, protected
242. Effective letter heteronyms
Notes on intellectual property law in Yu classroom
看源码之LinkedList
Dichotomous template summary
easyui03
C#笔记
Dictionary and int matrix
Le audio specification overview
MySQL数据库的简单使用
加载ORB词典
36.【const函数放在函数前后的区别】
企鹅龙(DRBL)无盘启动+再生龙(clonezilla)网络备份与还原系统
为什么放弃npm转向yarn了
Linkedblockingqueue of novice source code
承认吧 投新能源就是为了安全感
Novice source code hashtable
配置文件以rc结尾什么意思
Bash shell learning notes (V)
Pyqt5 rapid development and practice Chapter 1 understanding pyqt5









