Commit c088890c authored by René J.V. Bertin's avatar René J.V. Bertin

CMake plugin: don't hardcode a default install prefix.

CMake already has a default install prefix itself which will be used
when KDevelop does not specify one (and which could be non-standard
e.g. when CMake is called through a wrapper).

Differential Revision: https://phabricator.kde.org/D17255
parent 86bd95c7
......@@ -79,6 +79,12 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>The prefix under which the project will be installed. Leaving this empty will let CMake use its default install prefix.</string>
</property>
<property name="placeholderText">
<string>CMake's default install prefix</string>
</property>
</widget>
</item>
<item row="4" column="0">
......
......@@ -359,13 +359,7 @@ KDevelop::Path currentCMakeExecutable(KDevelop::IProject* project, int builddir)
KDevelop::Path currentInstallDir( KDevelop::IProject* project, int builddir )
{
const QString defaultInstallDir =
#ifdef Q_OS_WIN
QStringLiteral("C:\\Program Files");
#else
QStringLiteral("/usr/local");
#endif
return KDevelop::Path(readBuildDirParameter( project, Config::Specific::cmakeInstallDirKey, defaultInstallDir, builddir ));
return KDevelop::Path(readBuildDirParameter( project, Config::Specific::cmakeInstallDirKey, QString(), builddir ));
}
QString projectRootRelative( KDevelop::IProject* project )
......
......@@ -116,7 +116,8 @@ namespace CMake
KDEVCMAKECOMMON_EXPORT KDevelop::Path currentCMakeExecutable(KDevelop::IProject* project, int builddir = -1);
/**
* @returns the current install dir for the given project or "/usr/local" as default value.
* @returns the current install dir for the given project or an empty string if none has been defined
* (in that case, whatever default CMake sets for the platform will be used.)
*/
KDEVCMAKECOMMON_EXPORT KDevelop::Path currentInstallDir( KDevelop::IProject* project, int builddir = -1 );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment