当前位置:网站首页>Solve cmakelist find_ Package cannot find Qt5, ECM cannot be found
Solve cmakelist find_ Package cannot find Qt5, ECM cannot be found
2022-07-05 16:39:00 【Trendy technology research society】
Compiling a cmake When the project is , Need to use ECM, So using vcpkg install ecm, Results the installation was successful , however cmake Still don't recognize ,find_package Report errors , Can't find ecm Location , Obviously ,vcpkg install ecm To packages Under the path , This packages The path is not cmake Find the
Now , We need to be in CMakeList Add path description to the file , That is to use set 了 .
As shown in the figure below ,Qt5 Can directly set, however ECM, I can't find it ECM How to set the path of ,Qt5_DIR We often see , however ECM_DIR But I have never seen , Obviously , Give it a try , no way .
Then I tried to vcpkg in packages In the catalog ecm Installation directory share Copy the directory directly to cmake share Directory ,cmake Successfully found ecm, But that's normal ,cmake Look under your own path , It must be found .
find_package(ECM ${KF5_MIN_VERSION} REQUIRED CONFIG)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} )
set(Qt5_DIR "D:\\Qt\\5.15.2\\msvc2019_64\\lib\\cmake\\Qt5")
find_package(Qt5 ${QT_MIN_VERSION} REQUIRED NO_MODULE COMPONENTS Widgets Svg Concurrent)
边栏推荐
猜你喜欢

为季前卡牌游戏 MotoGP Ignition Champions 做好准备!

养不起真猫,就用代码吸猫 -Unity 粒子实现画猫咪

ES6 drill down - Async functions and symbol types

【 brosser le titre 】 chemise culturelle de l'usine d'oies

极坐标扇图使用场景与功能详解

Domestic API management artifact used by the company

解决CMakeList find_package找不到Qt5,找不到ECM

Fleet tutorial 09 basic introduction to navigationrail (tutorial includes source code)

【学术相关】多位博士毕业去了三四流高校,目前惨不忍睹……

Today's sleep quality record 79 points
随机推荐
ES6深入—async 函数 与 Symbol 类型
Enterprise backup software Veritas NetBackup (NBU) 8.1.1 installation and deployment of server
[es6] add if judgment or ternary operator judgment in the template string
一些认知的思考
sqlserver 做cdc 要对数据库性能有什么要求么
漫画:什么是分布式事务?
极坐标扇图使用场景与功能详解
解决CMakeList find_package找不到Qt5,找不到ECM
The memory of a Zhang
EDI许可证和ICP经营性证有什么区别
BS-XX-042 基于SSM实现人事管理系统
[vulnerability warning] cve-2022-26134 conflict Remote Code Execution Vulnerability POC verification and repair process
【 brosser le titre 】 chemise culturelle de l'usine d'oies
Fleet tutorial 09 basic introduction to navigationrail (tutorial includes source code)
详解SQL中Groupings Sets 语句的功能和底层实现逻辑
ES6 deep - ES6 class class
单商户 V4.4,初心未变,实力依旧!
树莓派4b安装Pytorch1.11
[深度学习][原创]让yolov6-0.1.0支持yolov5的txt读取数据集模式
Intel 13th generation Raptor Lake processor information exposure: more cores, larger cache