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.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
You can extend or set the module path like so:
list(APPEND CMAKE_MODULE_PATH "some path to modules")
or:
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "path")
Just like you can any other (list) variable.