Skip to content

cmake-gui: Handle relative paths in the build directory text input

Roc R. Currius requested to merge ror3d/cmake:gui-relative-build-path into master

Interpret a relative path with respect to the previously configured directory.

When using the GUI to build several small projects consecutively (supposing they are built in a <project_path>/build directory), one has to change the source path, and then select the parent part of the target directory to paste on top of it, which makes it cumbersome. Allowing for a relative path as the target directory based on the source path makes it much simpler.

I have had to include a new setting to ensure that the source path gets properly loaded after application restart, since it previously relied on loading the configuration from the last used build directory and using the source path from that. It still does that, but now it keeps the base path of the build directory in a separate configuration entry, so it can load the proper cache using it.

Edited by Brad King

Merge request reports