in cmake, can cmake folder and CMakeLists.txt sit in different folder?\

usually, cmake folder and CmakeLists.txt are in same source root directory. But, to re-use cmake folder for different project, is that possible to put cmake folder into other places?

Is this a good approach ans thinking?

Thanks,

有帮助吗?

解决方案

I don't see any problem with that. You just have to know the relative path from the ${CMAKE_SOURCE_DIR} or the absolute path in order to use it in your CMake files.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top