File indexing completed on 2024-05-05 16:46:01
0001 /* 0002 SPDX-FileCopyrightText: 2017 Aleix Pol Gonzalez <aleixpol@kde.org> 0003 SPDX-FileCopyrightText: 2018 Daniel Mensinger <daniel@mensinger-ka.de> 0004 0005 SPDX-License-Identifier: LGPL-2.0-or-later 0006 */ 0007 0008 #pragma once 0009 0010 #include <util/path.h> 0011 0012 #include <KConfigGroup> 0013 0014 namespace KDevelop 0015 { 0016 class IProject; 0017 } 0018 0019 namespace Meson 0020 { 0021 0022 struct BuildDir { 0023 KDevelop::Path buildDir; 0024 KDevelop::Path mesonExecutable; 0025 QString mesonBackend; 0026 QString mesonArgs; 0027 0028 bool isValid() const; 0029 void canonicalizePaths(); 0030 }; 0031 0032 struct MesonConfig { 0033 int currentIndex = -1; 0034 QVector<BuildDir> buildDirs; 0035 0036 int addBuildDir(BuildDir dir); 0037 bool removeBuildDir(int index); 0038 }; 0039 0040 KConfigGroup rootGroup(KDevelop::IProject* project); 0041 BuildDir currentBuildDir(KDevelop::IProject* project); 0042 MesonConfig getMesonConfig(KDevelop::IProject* project); 0043 void writeMesonConfig(KDevelop::IProject* project, const MesonConfig& cfg); 0044 0045 }