如何在Windows上正确使用CMAKE_MODULE_PATH [英] How to use CMAKE_MODULE_PATH correctly on windows
本文介绍了如何在Windows上正确使用CMAKE_MODULE_PATH的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
什么是修改此变量的正确方法,以便CMake可以找到项目指定为需求的适当模块?它似乎是自动生成的,我找不到以任何方式修改此路径的环境变量。我也很难找到能很好解释这一点的文档。仅有安装 CMake软件包的说明,而没有详细说明如何实现。
What is the proper way to modify this variable so that CMake can find the appropriate modules that projects specify as requirements? It seems to be autogenerated and I cannot find environment variables that would modify this path in any way. I also am hard pressed to find documentation that explains this well; only instructions to "install" CMake packages with no details on how exactly that can be accomplished.
推荐答案
您可以扩展或设置像这样的模块路径:
You can extend or set the module path like so:
list(APPEND CMAKE_MODULE_PATH "some path to modules")
或:
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "path")
就像您可以使用任何其他(列表)变量一样。
Just like you can any other (list) variable.
这篇关于如何在Windows上正确使用CMAKE_MODULE_PATH的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文