简体   繁体   中英

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM