Switch to CMake for Linux desktop (#57238)
Updates the Linux templates to use CMake+ninja, rather than Make, and updates the tooling to generate CMake support files rather than Make support files, and to drive the build using cmake and ninja.
Also updates doctor to check for cmake and ninja in place of make.
Note: While we could use CMake+Make rather than CMake+ninja, in testing ninja handled the tool_backend.sh call much better, calling it only once rather than once per dependent target. While it does add another dependency that people are less likely to already have, it's widely available in package managers, as well as being available as a direct download. Longer term, we could potentially switch from ninja to Make if it's an issue.
Fixes #52751
diff --git a/packages/flutter_tools/lib/src/base/user_messages.dart b/packages/flutter_tools/lib/src/base/user_messages.dart
index a5dc91b..133232e 100644
--- a/packages/flutter_tools/lib/src/base/user_messages.dart
+++ b/packages/flutter_tools/lib/src/base/user_messages.dart
@@ -213,6 +213,21 @@
String get visualStudioIsIncomplete => 'The current Visual Studio installation is incomplete. Please reinstall Visual Studio.';
String get visualStudioRebootRequired => 'Visual Studio requires a reboot of your system to complete installation.';
+ // Messages used in LinuxDoctorValidator
+ String get clangMissing => 'clang++ is required for Linux development.\n'
+ 'It is likely available from your distribution (e.g.: apt install clang), or '
+ 'can be downloaded from https://releases.llvm.org/';
+ String clangTooOld(String minimumVersion) => 'clang++ $minimumVersion or later is required.';
+ String get cmakeMissing => 'CMake is required for Linux development.\n'
+ 'It is likely available from your distribution (e.g.: apt install cmake), or '
+ 'can be downloaded from https://cmake.org/download/';
+ String cmakeTooOld(String minimumVersion) => 'cmake $minimumVersion or later is required.';
+ String ninjaVersion(String version) => 'ninja version $version';
+ String get ninjaMissing => 'ninja is required for Linux development.\n'
+ 'It is likely available from your distribution (e.g.: apt install ninja-build), or '
+ 'can be downloaded from https://github.com/ninja-build/ninja/releases';
+ String ninjaTooOld(String minimumVersion) => 'ninja $minimumVersion or later is required.';
+
// Messages used in FlutterCommand
String flutterElapsedTime(String name, String elapsedTime) => '"flutter $name" took $elapsedTime.';
String get flutterNoDevelopmentDevice =>
diff --git a/packages/flutter_tools/lib/src/doctor.dart b/packages/flutter_tools/lib/src/doctor.dart
index c883bab..f492045 100644
--- a/packages/flutter_tools/lib/src/doctor.dart
+++ b/packages/flutter_tools/lib/src/doctor.dart
@@ -97,6 +97,7 @@
if (linuxWorkflow.appliesToHostPlatform)
LinuxDoctorValidator(
processManager: globals.processManager,
+ userMessages: userMessages,
),
if (windowsWorkflow.appliesToHostPlatform)
visualStudioValidator,
diff --git a/packages/flutter_tools/lib/src/linux/application_package.dart b/packages/flutter_tools/lib/src/linux/application_package.dart
index 13568eb..d1a579f 100644
--- a/packages/flutter_tools/lib/src/linux/application_package.dart
+++ b/packages/flutter_tools/lib/src/linux/application_package.dart
@@ -9,7 +9,7 @@
import '../build_info.dart';
import '../globals.dart' as globals;
import '../project.dart';
-import 'makefile.dart';
+import 'cmake.dart';
abstract class LinuxApp extends ApplicationPackage {
LinuxApp({@required String projectBundleId}) : super(id: projectBundleId);
@@ -58,8 +58,13 @@
@override
String executable(BuildMode buildMode) {
- final String binaryName = makefileExecutableName(project);
- return globals.fs.path.join(getLinuxBuildDirectory(), getNameForBuildMode(buildMode), binaryName);
+ final String binaryName = getCmakeExecutableName(project);
+ return globals.fs.path.join(
+ getLinuxBuildDirectory(),
+ getNameForBuildMode(buildMode),
+ 'bundle',
+ binaryName,
+ );
}
@override
diff --git a/packages/flutter_tools/lib/src/linux/build_linux.dart b/packages/flutter_tools/lib/src/linux/build_linux.dart
index 609f2a9..a823999 100644
--- a/packages/flutter_tools/lib/src/linux/build_linux.dart
+++ b/packages/flutter_tools/lib/src/linux/build_linux.dart
@@ -7,11 +7,13 @@
import '../base/file_system.dart';
import '../base/logger.dart';
import '../base/process.dart';
+import '../base/utils.dart';
import '../build_info.dart';
import '../cache.dart';
import '../globals.dart' as globals;
import '../plugins.dart';
import '../project.dart';
+import 'cmake.dart';
/// Builds the Linux project through the Makefile.
Future<void> buildLinux(
@@ -19,7 +21,7 @@
BuildInfo buildInfo, {
String target = 'lib/main.dart',
}) async {
- if (!linuxProject.makeFile.existsSync()) {
+ if (!linuxProject.cmakeFile.existsSync()) {
throwToolExit('No Linux desktop project configured. See '
'https://github.com/flutter/flutter/wiki/Desktop-shells#create '
'to learn about adding Linux support to a project.');
@@ -39,29 +41,18 @@
'Upgrade Flutter and try again.');
}
- final StringBuffer buffer = StringBuffer('''
-# Generated code do not commit.
-export FLUTTER_ROOT=${Cache.flutterRoot}
-export FLUTTER_TARGET=$target
-export PROJECT_DIR=${linuxProject.project.directory.path}
-''');
+ // Build the environment that needs to be set for the re-entrant flutter build
+ // step.
final Map<String, String> environmentConfig = buildInfo.toEnvironmentConfig();
- for (final String key in environmentConfig.keys) {
- final String value = environmentConfig[key];
- buffer.writeln('export $key=$value');
- }
-
+ environmentConfig['FLUTTER_TARGET'] = target;
if (globals.artifacts is LocalEngineArtifacts) {
final LocalEngineArtifacts localEngineArtifacts = globals.artifacts as LocalEngineArtifacts;
final String engineOutPath = localEngineArtifacts.engineOutPath;
- buffer.writeln('export FLUTTER_ENGINE=${globals.fs.path.dirname(globals.fs.path.dirname(engineOutPath))}');
- buffer.writeln('export LOCAL_ENGINE=${globals.fs.path.basename(engineOutPath)}');
+ environmentConfig['FLUTTER_ENGINE'] = globals.fs.path.dirname(globals.fs.path.dirname(engineOutPath));
+ environmentConfig['LOCAL_ENGINE'] = globals.fs.path.basename(engineOutPath);
}
+ writeGeneratedCmakeConfig(Cache.flutterRoot, linuxProject, environmentConfig);
- /// Cache flutter configuration files in the linux directory.
- linuxProject.generatedMakeConfigFile
- ..createSync(recursive: true)
- ..writeAsStringSync(buffer.toString());
createPluginSymlinks(linuxProject.project);
if (!buildInfo.isDebug) {
@@ -73,36 +64,77 @@
globals.printStatus('');
}
- // Invoke make.
- final String buildFlag = getNameForBuildMode(buildInfo.mode ?? BuildMode.release);
- final Stopwatch sw = Stopwatch()..start();
final Status status = globals.logger.startProgress(
'Building Linux application...',
timeout: null,
);
+ try {
+ final String buildModeName = getNameForBuildMode(buildInfo.mode ?? BuildMode.release);
+ final Directory buildDirectory = globals.fs.directory(getLinuxBuildDirectory()).childDirectory(buildModeName);
+ await _runCmake(buildModeName, linuxProject.cmakeFile.parent, buildDirectory);
+ await _runBuild(buildDirectory);
+ } finally {
+ status.cancel();
+ }
+}
+
+Future<void> _runCmake(String buildModeName, Directory sourceDir, Directory buildDir) async {
+ final Stopwatch sw = Stopwatch()..start();
+
+ final String buildFlag = toTitleCase(buildModeName);
int result;
try {
result = await processUtils.stream(
<String>[
- 'make',
+ 'cmake',
+ '-S',
+ sourceDir.path,
+ '-B',
+ buildDir.path,
+ '-G',
+ 'Ninja',
+ '-DCMAKE_BUILD_TYPE=$buildFlag',
+ ],
+ environment: <String, String>{
+ 'CC': 'clang',
+ 'CXX': 'clang++'
+ },
+ trace: true,
+ );
+ } on ArgumentError {
+ throwToolExit("cmake not found. Run 'flutter doctor' for more information.");
+ }
+ if (result != 0) {
+ throwToolExit('Unable to generate build files');
+ }
+ globals.flutterUsage.sendTiming('build', 'cmake-linux', Duration(milliseconds: sw.elapsedMilliseconds));
+}
+
+Future<void> _runBuild(Directory buildDir) async {
+ final Stopwatch sw = Stopwatch()..start();
+
+ int result;
+ try {
+ result = await processUtils.stream(
+ <String>[
+ 'ninja',
'-C',
- linuxProject.makeFile.parent.path,
- 'BUILD=$buildFlag',
+ buildDir.path,
+ 'install',
],
environment: <String, String>{
if (globals.logger.isVerbose)
'VERBOSE_SCRIPT_LOGGING': 'true'
- }, trace: true,
+ },
+ trace: true,
);
} on ArgumentError {
- throwToolExit("make not found. Run 'flutter doctor' for more information.");
- } finally {
- status.cancel();
+ throwToolExit("ninja not found. Run 'flutter doctor' for more information.");
}
if (result != 0) {
throwToolExit('Build process failed');
}
- globals.flutterUsage.sendTiming('build', 'make-linux', Duration(milliseconds: sw.elapsedMilliseconds));
+ globals.flutterUsage.sendTiming('build', 'linux-ninja', Duration(milliseconds: sw.elapsedMilliseconds));
}
// Checks the template version of [project] against the current template
diff --git a/packages/flutter_tools/lib/src/linux/cmake.dart b/packages/flutter_tools/lib/src/linux/cmake.dart
new file mode 100644
index 0000000..8a50066
--- /dev/null
+++ b/packages/flutter_tools/lib/src/linux/cmake.dart
@@ -0,0 +1,49 @@
+// Copyright 2014 The Flutter Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+import '../project.dart';
+
+/// Extracts the `BINARY_NAME` from a Linux project CMake file.
+///
+/// Returns `null` if it cannot be found.
+String getCmakeExecutableName(LinuxProject project) {
+ if (!project.cmakeFile.existsSync()) {
+ return null;
+ }
+ final RegExp nameSetPattern = RegExp(r'^\s*set\(BINARY_NAME\s*"(.*)"\s*\)\s*$');
+ for (final String line in project.cmakeFile.readAsLinesSync()) {
+ final RegExpMatch match = nameSetPattern.firstMatch(line);
+ if (match != null) {
+ return match.group(1);
+ }
+ }
+ return null;
+}
+
+/// Writes a generated CMake configuration file for [project], including
+/// variables expected by the build template and an environment variable list
+/// for calling back into Flutter.
+void writeGeneratedCmakeConfig(String flutterRoot, LinuxProject project, Map<String, String> environment) {
+ // Only a limited set of variables are needed by the CMake files themselves,
+ // the rest are put into a list to pass to the re-entrant build step.
+ final StringBuffer buffer = StringBuffer('''
+# Generated code do not commit.
+set(FLUTTER_ROOT "$flutterRoot")
+set(PROJECT_DIR "${project.project.directory.path}")
+
+# Environment variables to pass to tool_backend.sh
+list(APPEND FLUTTER_TOOL_ENVIRONMENT
+ "FLUTTER_ROOT=\\"\${FLUTTER_ROOT}\\""
+ "PROJECT_DIR=\\"\${PROJECT_DIR}\\""
+''');
+ for (final String key in environment.keys) {
+ final String value = environment[key];
+ buffer.writeln(' "$key=\\"$value\\""');
+ }
+ buffer.writeln(')');
+
+ project.generatedCmakeConfigFile
+ ..createSync(recursive: true)
+ ..writeAsStringSync(buffer.toString());
+}
diff --git a/packages/flutter_tools/lib/src/linux/linux_doctor.dart b/packages/flutter_tools/lib/src/linux/linux_doctor.dart
index 026052c..94e1c72 100644
--- a/packages/flutter_tools/lib/src/linux/linux_doctor.dart
+++ b/packages/flutter_tools/lib/src/linux/linux_doctor.dart
@@ -6,70 +6,133 @@
import 'package:process/process.dart';
import '../base/io.dart';
+import '../base/user_messages.dart';
import '../base/version.dart';
import '../doctor.dart';
+/// A combination of version description and parsed version number.
+class _VersionInfo {
+ /// Constructs a VersionInfo from a version description string.
+ ///
+ /// This should contain a version number. For example:
+ /// "clang version 9.0.1-6+build1"
+ _VersionInfo(this.description) {
+ final String versionString = RegExp(r'[0-9]+\.[0-9]+\.[0-9]+').firstMatch(description).group(0);
+ number = Version.parse(versionString);
+ }
+
+ // The full info string reported by the binary.
+ String description;
+
+ // The parsed Version.
+ Version number;
+}
+
/// A validator that checks for Clang and Make build dependencies
class LinuxDoctorValidator extends DoctorValidator {
LinuxDoctorValidator({
@required ProcessManager processManager,
+ @required UserMessages userMessages,
}) : _processManager = processManager,
+ _userMessages = userMessages,
super('Linux toolchain - develop for Linux desktop');
final ProcessManager _processManager;
+ final UserMessages _userMessages;
- /// The minimum version of clang supported.
- final Version minimumClangVersion = Version(3, 4, 0);
+ static const String kClangBinary = 'clang++';
+ static const String kCmakeBinary = 'cmake';
+ static const String kNinjaBinary = 'ninja';
+
+ final Map<String, Version> _requiredBinaryVersions = <String, Version>{
+ kClangBinary: Version(3, 4, 0),
+ kCmakeBinary: Version(3, 10, 0),
+ kNinjaBinary: Version(1, 8, 0),
+ };
@override
Future<ValidationResult> validate() async {
ValidationType validationType = ValidationType.installed;
final List<ValidationMessage> messages = <ValidationMessage>[];
- /// Check for a minimum version of Clang.
- ProcessResult clangResult;
- try {
- clangResult = await _processManager.run(const <String>[
- 'clang++',
- '--version',
- ]);
- } on ArgumentError {
- // ignore error.
- }
- if (clangResult == null || clangResult.exitCode != 0) {
+
+ final Map<String, _VersionInfo> installedVersions = <String, _VersionInfo>{
+ // Sort the check to make the call order predictable for unit tests.
+ for (String binary in _requiredBinaryVersions.keys.toList()..sort())
+ binary: await _getBinaryVersion(binary)
+ };
+
+ // Determine overall validation level.
+ if (installedVersions.values.contains(null)) {
validationType = ValidationType.missing;
- messages.add(const ValidationMessage.error('clang++ is not installed'));
- } else {
- final String firstLine = (clangResult.stdout as String).split('\n').first.trim();
- final String versionString = RegExp(r'[0-9]+\.[0-9]+\.[0-9]+').firstMatch(firstLine).group(0);
- final Version version = Version.parse(versionString);
- if (version >= minimumClangVersion) {
- messages.add(ValidationMessage('clang++ $version'));
+ } else if (installedVersions.keys.any((String binary) =>
+ installedVersions[binary].number < _requiredBinaryVersions[binary])) {
+ validationType = ValidationType.partial;
+ }
+
+ // Message for Clang.
+ {
+ final _VersionInfo version = installedVersions[kClangBinary];
+ if (version == null) {
+ messages.add(ValidationMessage.error(_userMessages.clangMissing));
} else {
- validationType = ValidationType.partial;
- messages.add(ValidationMessage.error('clang++ $version is below minimum version of $minimumClangVersion'));
+ messages.add(ValidationMessage(version.description));
+ final Version requiredVersion = _requiredBinaryVersions[kClangBinary];
+ if (version.number < requiredVersion) {
+ messages.add(ValidationMessage.error(_userMessages.clangTooOld(requiredVersion.toString())));
+ }
}
}
- /// Check for make.
- // TODO(jonahwilliams): tighten this check to include a version when we have
- // a better idea about what is supported.
- ProcessResult makeResult;
+ // Message for CMake.
+ {
+ final _VersionInfo version = installedVersions[kCmakeBinary];
+ if (version == null) {
+ messages.add(ValidationMessage.error(_userMessages.cmakeMissing));
+ } else {
+ messages.add(ValidationMessage(version.description));
+ final Version requiredVersion = _requiredBinaryVersions[kCmakeBinary];
+ if (version.number < requiredVersion) {
+ messages.add(ValidationMessage.error(_userMessages.cmakeTooOld(requiredVersion.toString())));
+ }
+ }
+ }
+
+ // Message for ninja.
+ {
+ final _VersionInfo version = installedVersions[kNinjaBinary];
+ if (version == null) {
+ messages.add(ValidationMessage.error(_userMessages.ninjaMissing));
+ } else {
+ // The full version description is just the number, so context.
+ messages.add(ValidationMessage(_userMessages.ninjaVersion(version.description)));
+ final Version requiredVersion = _requiredBinaryVersions[kNinjaBinary];
+ if (version.number < requiredVersion) {
+ messages.add(ValidationMessage.error(_userMessages.ninjaTooOld(requiredVersion.toString())));
+ }
+ }
+ }
+
+ return ValidationResult(validationType, messages);
+ }
+
+ /// Returns the installed version of [binary], or null if it's not installed.
+ ///
+ /// Requires tha [binary] take a '--version' flag, and print a version of the
+ /// form x.y.z somewhere on the first line of output.
+ Future<_VersionInfo> _getBinaryVersion(String binary) async {
+ ProcessResult result;
try {
- makeResult = await _processManager.run(const <String>[
- 'make',
+ result = await _processManager.run(<String>[
+ binary,
'--version',
]);
} on ArgumentError {
// ignore error.
}
- if (makeResult == null || makeResult.exitCode != 0) {
- validationType = ValidationType.missing;
- messages.add(const ValidationMessage.error('make is not installed'));
- } else {
- final String firstLine = (makeResult.stdout as String).split('\n').first.trim();
- messages.add(ValidationMessage(firstLine));
+ if (result == null || result.exitCode != 0) {
+ return null;
}
-
- return ValidationResult(validationType, messages);
+ final String firstLine = (result.stdout as String).split('\n').first.trim();
+ return _VersionInfo(firstLine);
}
}
diff --git a/packages/flutter_tools/lib/src/linux/makefile.dart b/packages/flutter_tools/lib/src/linux/makefile.dart
deleted file mode 100644
index 3876795..0000000
--- a/packages/flutter_tools/lib/src/linux/makefile.dart
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright 2014 The Flutter Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-import '../base/file_system.dart';
-import '../project.dart';
-
-// The setting that controls the executable name in the linux makefile.
-const String _kBinaryNameVariable = 'BINARY_NAME=';
-
-/// Extracts the `BINARY_NAME` from a linux project Makefile.
-///
-/// Returns `null` if it cannot be found.
-String makefileExecutableName(LinuxProject project) {
- // Support the binary name being set either in the Makefile, or in the
- // separate configution include file used by the template.
- final List<File> makeFiles = <File>[
- project.makeFile.parent.childFile('app_configuration.mk'),
- project.makeFile,
- ];
- for (final File file in makeFiles) {
- if (!file.existsSync()) {
- continue;
- }
- for (final String line in file.readAsLinesSync()) {
- if (line.startsWith(_kBinaryNameVariable)) {
- return line.split(_kBinaryNameVariable).last.trim();
- }
- }
- }
- return null;
-}
diff --git a/packages/flutter_tools/lib/src/plugins.dart b/packages/flutter_tools/lib/src/plugins.dart
index 4ed7421..b4124ae 100644
--- a/packages/flutter_tools/lib/src/plugins.dart
+++ b/packages/flutter_tools/lib/src/plugins.dart
@@ -794,38 +794,17 @@
}
''';
-const String _linuxPluginMakefileTemplate = '''
-# Plugins to include in the build.
-GENERATED_PLUGINS=\\
+const String _linuxPluginCmakefileTemplate = r'''
+list(APPEND FLUTTER_PLUGIN_LIST
{{#plugins}}
-\t{{name}} \\
+ {{name}}
{{/plugins}}
+)
-GENERATED_PLUGINS_DIR={{pluginsDir}}
-# A plugin library name plugin name with _plugin appended.
-GENERATED_PLUGIN_LIB_NAMES=\$(foreach plugin,\$(GENERATED_PLUGINS),\$(plugin)_plugin)
-
-# Variables for use in the enclosing Makefile. Changes to these names are
-# breaking changes.
-PLUGIN_TARGETS=\$(GENERATED_PLUGINS)
-PLUGIN_LIBRARIES=\$(foreach plugin,\$(GENERATED_PLUGIN_LIB_NAMES),\\
-\t\$(OUT_DIR)/lib\$(plugin).so)
-PLUGIN_LDFLAGS=\$(patsubst %,-l%,\$(GENERATED_PLUGIN_LIB_NAMES))
-PLUGIN_CPPFLAGS=\$(foreach plugin,\$(GENERATED_PLUGINS),\\
-\t-I\$(GENERATED_PLUGINS_DIR)/\$(plugin)/linux)
-
-# Targets
-
-# Implicit rules don't match phony targets, so list plugin builds explicitly.
-{{#plugins}}
-\$(OUT_DIR)/lib{{name}}_plugin.so: | {{name}}
-{{/plugins}}
-
-.PHONY: \$(GENERATED_PLUGINS)
-\$(GENERATED_PLUGINS):
- make -C \$(GENERATED_PLUGINS_DIR)/\$@/linux \\
- OUT_DIR=\$(OUT_DIR) \\
- FLUTTER_EPHEMERAL_DIR="\$(abspath {{ephemeralDir}})"
+foreach(plugin ${FLUTTER_PLUGIN_LIST})
+ add_subdirectory({{pluginsDir}}/${plugin}/linux plugins/${plugin})
+ target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin)
+endforeach(plugin)
''';
Future<void> _writeIOSPluginRegistrant(FlutterProject project, List<Plugin> plugins) async {
@@ -871,31 +850,26 @@
Future<void> _writeLinuxPluginFiles(FlutterProject project, List<Plugin> plugins) async {
final List<Plugin>nativePlugins = _filterNativePlugins(plugins, LinuxPlugin.kConfigKey);
final List<Map<String, dynamic>> linuxPlugins = _extractPlatformMaps(nativePlugins, LinuxPlugin.kConfigKey);
- // The generated makefile is checked in, so can't use absolute paths. It is
- // included by the main makefile, so relative paths must be relative to that
- // file's directory.
- final String makefileDirPath = project.linux.makeFile.parent.absolute.path;
+ // The generated file is checked in, so can't use absolute paths. It is
+ // included by the main CMakeLists.txt, so relative paths must be relative to
+ // that file's directory.
+ final String makefileDirPath = project.linux.cmakeFile.parent.absolute.path;
final Map<String, dynamic> context = <String, dynamic>{
'plugins': linuxPlugins,
- 'ephemeralDir': globals.fs.path.relative(
- project.linux.ephemeralDirectory.absolute.path,
- from: makefileDirPath,
- ),
'pluginsDir': globals.fs.path.relative(
project.linux.pluginSymlinkDirectory.absolute.path,
from: makefileDirPath,
),
};
await _writeCppPluginRegistrant(project.linux.managedDirectory, context);
- await _writeLinuxPluginMakefile(project.linux.managedDirectory, context);
+ await _writeLinuxPluginCmakefile(project.linux.generatedPluginCmakeFile, context);
}
-Future<void> _writeLinuxPluginMakefile(Directory destination, Map<String, dynamic> templateContext) async {
- final String registryDirectory = destination.path;
+Future<void> _writeLinuxPluginCmakefile(File destinationFile, Map<String, dynamic> templateContext) async {
_renderTemplateToFile(
- _linuxPluginMakefileTemplate,
+ _linuxPluginCmakefileTemplate,
templateContext,
- globals.fs.path.join(registryDirectory, 'generated_plugins.mk'),
+ destinationFile.path,
);
}
diff --git a/packages/flutter_tools/lib/src/project.dart b/packages/flutter_tools/lib/src/project.dart
index 8ef4656..3070135 100644
--- a/packages/flutter_tools/lib/src/project.dart
+++ b/packages/flutter_tools/lib/src/project.dart
@@ -1068,15 +1068,15 @@
@override
bool existsSync() => _editableDirectory.existsSync();
- /// The Linux project makefile.
- File get makeFile => _editableDirectory.childFile('Makefile');
+ /// The Linux project CMake specification.
+ File get cmakeFile => _editableDirectory.childFile('CMakeLists.txt');
/// Contains definitions for FLUTTER_ROOT, LOCAL_ENGINE, and more flags for
/// the build.
- File get generatedMakeConfigFile => ephemeralDirectory.childFile('generated_config.mk');
+ File get generatedCmakeConfigFile => ephemeralDirectory.childFile('generated_config.cmake');
- /// Makefile with rules and variables for plugin builds.
- File get generatedPluginMakeFile => managedDirectory.childFile('generated_plugins.mk');
+ /// Includable CMake with rules and variables for plugin builds.
+ File get generatedPluginCmakeFile => managedDirectory.childFile('generated_plugins.cmake');
/// The directory to write plugin symlinks.
Directory get pluginSymlinkDirectory => ephemeralDirectory.childDirectory('.plugin_symlinks');