How to use CMAKE_MODULE_PATH correctly on windows

2019-06-26 03:08发布

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.

标签: cmake
1条回答
神经病院院长
2楼-- · 2019-06-26 03:44

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.

查看更多
登录 后发表回答