I have a build/ directory where I'd like CMake to put the *.sln, *.proj, etc. files it generates when I type cmake CMakeLists.txt. How do I do this?
You run cmake in the directory you want to build in with the path from the build directory to the source directory. So say your parent directory is called project and it contains src and build you would:
cd build
cmake ../src
That will put the makefiles and the objects in build while leaving the CMakeLists.txt files in src. The one pitfall is that if there is already a CMakeCache.txt in src then you must delete before running cmake.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With