Changeset View
Changeset View
Standalone View
Standalone View
plugins/meson/mesonjob.cpp
Show All 38 Lines | 34 | { | |||
---|---|---|---|---|---|
39 | setStandardToolView(KDevelop::IOutputView::BuildView); | 39 | setStandardToolView(KDevelop::IOutputView::BuildView); | ||
40 | setBehaviours(KDevelop::IOutputView::AllowUserClose | KDevelop::IOutputView::AutoScroll); | 40 | setBehaviours(KDevelop::IOutputView::AllowUserClose | KDevelop::IOutputView::AutoScroll); | ||
41 | setProperties(NeedWorkingDirectory | PortableMessages | DisplayStdout | DisplayStderr); | 41 | setProperties(NeedWorkingDirectory | PortableMessages | DisplayStdout | DisplayStderr); | ||
42 | 42 | | |||
43 | *this << buildDir.mesonExecutable.toLocalFile(); | 43 | *this << buildDir.mesonExecutable.toLocalFile(); | ||
44 | 44 | | |||
45 | switch (m_commandType) { | 45 | switch (m_commandType) { | ||
46 | case CONFIGURE: | 46 | case CONFIGURE: | ||
47 | if (!buildDir.installPrefix.isEmpty()) { | | |||
48 | *this << QStringLiteral("--prefix") << buildDir.installPrefix.toLocalFile(); | | |||
49 | } | | |||
50 | | ||||
51 | *this << QStringLiteral("--backend") << buildDir.mesonBackend; | 47 | *this << QStringLiteral("--backend") << buildDir.mesonBackend; | ||
52 | *this << QStringLiteral("--buildtype") << buildDir.buildType; | | |||
53 | | ||||
54 | for (auto const& i : buildDir.mesonArgs) { | | |||
55 | *this << i; | | |||
56 | } | | |||
57 | | ||||
58 | break; | 48 | break; | ||
59 | case RE_CONFIGURE: | 49 | case RE_CONFIGURE: | ||
60 | *this << QStringLiteral("--reconfigure"); | 50 | *this << QStringLiteral("--reconfigure"); | ||
61 | break; | 51 | break; | ||
62 | case SET_CONFIG: | 52 | case SET_CONFIG: | ||
63 | *this << QStringLiteral("configure"); | 53 | *this << QStringLiteral("configure"); | ||
64 | if (!buildDir.installPrefix.isEmpty()) { | 54 | break; | ||
65 | *this << QStringLiteral("-Dprefix=") + buildDir.installPrefix.toLocalFile(); | | |||
66 | } | | |||
67 | *this << QStringLiteral("-Dbuildtype=") + buildDir.buildType; | | |||
68 | } | 55 | } | ||
69 | 56 | | |||
70 | *this << m_arguments; | 57 | *this << m_arguments; | ||
58 | | ||||
59 | for (auto i : buildDir.mesonArgs.split(QChar::fromLatin1(' '))) { | ||||
60 | if (!i.isEmpty()) { | ||||
61 | *this << i; | ||||
62 | } | ||||
63 | } | ||||
64 | | ||||
71 | *this << buildDir.buildDir.toLocalFile(); | 65 | *this << buildDir.buildDir.toLocalFile(); | ||
72 | } | 66 | } | ||
73 | 67 | | |||
74 | QUrl MesonJob::workingDirectory() const | 68 | QUrl MesonJob::workingDirectory() const | ||
75 | { | 69 | { | ||
76 | return m_project->path().toUrl(); | 70 | return m_project->path().toUrl(); | ||
77 | } | 71 | } |