Index: config-kdevelop.h.cmake =================================================================== --- config-kdevelop.h.cmake +++ config-kdevelop.h.cmake @@ -3,6 +3,8 @@ /* config-kdevelop.h. Generated by cmake from config-kdevelop.h.cmake */ +#define KDEVELOP_INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@" + #cmakedefine01 KDEVELOP_SINGLE_APP #cmakedefine01 KF5SysGuard_FOUND Index: plugins/cmake/cmakebuilddirchooser.ui =================================================================== --- plugins/cmake/cmakebuilddirchooser.ui +++ plugins/cmake/cmakebuilddirchooser.ui @@ -79,6 +79,9 @@ 0 + + The prefix under which the project will be installed. Leaving this empty will let CMake use its default install prefix. + Index: plugins/cmake/cmakeutils.h =================================================================== --- plugins/cmake/cmakeutils.h +++ plugins/cmake/cmakeutils.h @@ -116,7 +116,8 @@ 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 ); Index: plugins/cmake/cmakeutils.cpp =================================================================== --- plugins/cmake/cmakeutils.cpp +++ plugins/cmake/cmakeutils.cpp @@ -359,13 +359,7 @@ 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 ) Index: plugins/manpage/manpageplugin.cpp =================================================================== --- plugins/manpage/manpageplugin.cpp +++ plugins/manpage/manpageplugin.cpp @@ -18,6 +18,7 @@ Boston, MA 02110-1301, USA. */ +#include "config-kdevelop.h" #include "manpageplugin.h" #include "manpagedocumentation.h" @@ -93,7 +94,8 @@ // Don't show man-page documentation for files that are not in /usr/include, because then we // most probably will be confusing the global function-name with a local one - if (!dec->topContext()->url().str().startsWith(QLatin1String("/usr/"))) + if (!dec->topContext()->url().str().startsWith(QLatin1String("/usr/")) + && !dec->topContext()->url().str().startsWith(QLatin1String(KDEVELOP_INSTALL_PREFIX))) return {}; ///@todo Do more verification to make sure that we're showing the correct documentation for the declaration