mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-07 06:40:16 -05:00
CodeLite: Prefer CMAKE_RUNTIME_OUTPUT_DIRECTORY for output path
Use the deprecated `EXECUTABLE_OUTPUT_PATH` as a fallback.
This commit is contained in:
committed by
Brad King
parent
acd322ebe4
commit
334c8ba7a4
@@ -408,7 +408,6 @@ void cmExtraCodeLiteGenerator::CreateProjectSourceEntries(
|
|||||||
const std::string& projectPath, const cmMakefile* mf,
|
const std::string& projectPath, const cmMakefile* mf,
|
||||||
const std::string& projectType, const std::string& targetName)
|
const std::string& projectType, const std::string& targetName)
|
||||||
{
|
{
|
||||||
|
|
||||||
cmXMLWriter& xml(*_xml);
|
cmXMLWriter& xml(*_xml);
|
||||||
FindMatchingHeaderfiles(cFiles, otherFiles);
|
FindMatchingHeaderfiles(cFiles, otherFiles);
|
||||||
// Create 2 virtual folders: src and include
|
// Create 2 virtual folders: src and include
|
||||||
@@ -469,10 +468,14 @@ void cmExtraCodeLiteGenerator::CreateProjectSourceEntries(
|
|||||||
xml.EndElement(); // ResourceCompiler
|
xml.EndElement(); // ResourceCompiler
|
||||||
|
|
||||||
xml.StartElement("General");
|
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;
|
std::string relapath;
|
||||||
if (!outputPath.empty()) {
|
if (!outputPath.empty()) {
|
||||||
relapath = cmSystemTools::RelativePath(this->WorkspacePath, outputPath);
|
relapath = cmSystemTools::RelativePath(projectPath, outputPath);
|
||||||
xml.Attribute("OutputFile", relapath + "/$(ProjectName)");
|
xml.Attribute("OutputFile", relapath + "/$(ProjectName)");
|
||||||
} else {
|
} else {
|
||||||
xml.Attribute("OutputFile", "$(IntermediateDirectory)/$(ProjectName)");
|
xml.Attribute("OutputFile", "$(IntermediateDirectory)/$(ProjectName)");
|
||||||
|
|||||||
Reference in New Issue
Block a user