当前位置:网站首页>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)
边栏推荐
- Classified by the number of 1 in binary number
- Pre post pytest method
- Implementing queues with two stacks
- Bash shell学习笔记(二)
- pytest pytest. Ini configuration case grouping case skipping
- 复现php一句话木马
- Dichotomous template summary
- [开发工具] IEDA报红
- 企鹅龙(DRBL)无盘启动+再生龙(clonezilla)网络备份与还原系统
- PyQt5快速开发与实战 3.1 Qt Designer快速入门
猜你喜欢

菜鸟看源码之HashTable

win10 1903 笔记本开热点出现蓝屏问题

Simple use of MySQL database

Wireshark basic tutorial Ethernet frame analysis.

Bash shell学习笔记(二)

3dunity game project practice - first person shooting game

242. Effective letter heteronyms

Pyqt5 rapid development and practice 3.1 QT designer quick start

Bash shell learning notes (II)
![[vscode]如何远程连接服务器](/img/b4/9a80ad995bd589596d8b064215b55a.png)
[vscode]如何远程连接服务器
随机推荐
LE Audio规范概述
easyui04
What does it mean that the configuration file ends in RC
Logging advanced use
242. Effective letter heteronyms
MFC picture control
Dichotomous template summary
104. Maximum depth of binary tree
静态路由和动态路由
Generation and transformation of pulse waveform
菜鸟看源码之SparseArray
Linkedblockingqueue of novice source code
Bash shell learning notes (III)
MySQL死锁分析
SparkSQL的UDF及分析案例,220725,
A method to deal with the crash of C Halcon user control
mysql数据库进阶
Simple use of MFC multithreading
Scrapy shell出现的一个错误
看源码之LinkedList