Hi,
I am looking for some advice regarding the use of preset files: CMakePresets.json
I am building a 3rd party library for different platforms using a different set of variables for each platform and I want to use CMake presets for maintaining this setup.
How can I make CMake consume a CMakePresets.json
outside of the 3rd party library codebase?
- my-repo
- CMakePresets.json
- 3rd-party-library
- CMakeLists.txt
I’d like to be able to run something like
cmake --preset=my-config -B build-folder -S 3rd-party-library
However if I do that then cmake complains that it could not find the CMakePresets.json
file. I am assuming it only searches the 3rd-party-library
directory.
What is the best way to achieve my goal?
Regards,
Frederik