summaryrefslogtreecommitdiffstats
path: root/Source/cmExtraCodeLiteGenerator.cxx
diff options
context:
space:
mode:
authorTobias R. Henle <tobias@page23.de>2018-03-11 14:18:17 (GMT)
committerBrad King <brad.king@kitware.com>2018-03-14 17:23:28 (GMT)
commit334c8ba7a4da445732858162dc430200891f0433 (patch)
tree5b8317bd401c1cac8945863aa738f62efbdc3c44 /Source/cmExtraCodeLiteGenerator.cxx
parentacd322ebe4b1ef3a8b07df7f66860d06e6eb7cb5 (diff)
downloadCMake-334c8ba7a4da445732858162dc430200891f0433.zip
CMake-334c8ba7a4da445732858162dc430200891f0433.tar.gz
CMake-334c8ba7a4da445732858162dc430200891f0433.tar.bz2
CodeLite: Prefer CMAKE_RUNTIME_OUTPUT_DIRECTORY for output path
Use the deprecated `EXECUTABLE_OUTPUT_PATH` as a fallback.
Diffstat (limited to 'Source/cmExtraCodeLiteGenerator.cxx')
-rw-r--r--Source/cmExtraCodeLiteGenerator.cxx9
1 files changed, 6 insertions, 3 deletions
diff --git a/Source/cmExtraCodeLiteGenerator.cxx b/Source/cmExtraCodeLiteGenerator.cxx
index 3e37aad..c7c780c 100644
--- a/Source/cmExtraCodeLiteGenerator.cxx
+++ b/Source/cmExtraCodeLiteGenerator.cxx
@@ -408,7 +408,6 @@ void cmExtraCodeLiteGenerator::CreateProjectSourceEntries(
const std::string& projectPath, const cmMakefile* mf,
const std::string& projectType, const std::string& targetName)
{
-
cmXMLWriter& xml(*_xml);
FindMatchingHeaderfiles(cFiles, otherFiles);
// Create 2 virtual folders: src and include
@@ -469,10 +468,14 @@ void cmExtraCodeLiteGenerator::CreateProjectSourceEntries(
xml.EndElement(); // ResourceCompiler
xml.StartElement("General");
- std::string outputPath = mf->GetSafeDefinition("EXECUTABLE_OUTPUT_PATH");
+ std::string outputPath =
+ mf->GetSafeDefinition("CMAKE_RUNTIME_OUTPUT_DIRECTORY");
+ if (outputPath.empty()) {
+ outputPath = mf->GetSafeDefinition("EXECUTABLE_OUTPUT_PATH");
+ }
std::string relapath;
if (!outputPath.empty()) {
- relapath = cmSystemTools::RelativePath(this->WorkspacePath, outputPath);
+ relapath = cmSystemTools::RelativePath(projectPath, outputPath);
xml.Attribute("OutputFile", relapath + "/$(ProjectName)");
} else {
xml.Attribute("OutputFile", "$(IntermediateDirectory)/$(ProjectName)");