Windows: Make sure CMake location is configurable
Closed, ResolvedPublic


Add a configuration field in Settings -> CMake for specifying the default CMake location.

Right now KDevelop defaults to QStandardPaths::findExecutable, which fails if CMake is installed to a non-default location.

Bonus points for reading the Windows registry for the CMake location.

This is important for the CMake help plugin.

kfunk created this task.Aug 23 2015, 11:46 PM
kfunk updated the task description. (Show Details)
kfunk raised the priority of this task from to Needs Triage.
kfunk added a project: KDevelop.
kfunk moved this task to Backlog on the KDevelop board.
kfunk added a subscriber: kfunk.
arrowd added a subscriber: arrowd.Sep 15 2015, 4:12 PM

I've done small research and found that CMake doesn't seem to record its installation path in registry. I guess, all we can do is to check PATH, then standard installation dirs, which, again, can vary: {Program Files, Program Files (x86)}\\{CMake, CMake 2.8}.

Some searching logic is also required by git plugin, so what about having our own findExecutable()?

arrowd added a comment.Oct 8 2015, 3:17 PM

Ok, now i'm blocked by this problem:

It is, actually, a mix of two. The first one is that default value for "Generator" option is "Unix makefiles", but Qt's listbox doesn't get populated with this value on Windows. It's filled with "NMake makefiles" instead and this break saving and restoring default value. I hacked it around by substituting it in constructor, but the proper fix is to set it conditionally in cmakebuilderconfig.kcfg. Does KConfig have such feature.

The second problem is saving itself. QMake documentation plugin, for instance, uses different code path for saving stuff and it works for me.

kfunk closed this task as Resolved.Dec 2 2015, 9:44 PM
kfunk claimed this task.

Implemented now. Thanks a lot!

We're still kinda blocked by, but that's a different beast.