From 145df3995379f5c1d3a613b249080a3b0c32a938 Mon Sep 17 00:00:00 2001 From: Marcus Tomlinson Date: Wed, 5 Aug 2020 22:56:19 +0100 Subject: [PATCH] Explicitly find and link blkid using pkg-config (#62979) --- packages/flutter_tools/lib/src/linux/linux_doctor.dart | 1 + .../templates/app/linux.tmpl/flutter/CMakeLists.txt | 2 ++ .../test/general.shard/linux/linux_doctor_test.dart | 2 ++ 3 files changed, 5 insertions(+) diff --git a/packages/flutter_tools/lib/src/linux/linux_doctor.dart b/packages/flutter_tools/lib/src/linux/linux_doctor.dart index b4a79563c3..934946ea52 100644 --- a/packages/flutter_tools/lib/src/linux/linux_doctor.dart +++ b/packages/flutter_tools/lib/src/linux/linux_doctor.dart @@ -56,6 +56,7 @@ class LinuxDoctorValidator extends DoctorValidator { 'gtk+-3.0', 'glib-2.0', 'gio-2.0', + 'blkid', ]; @override diff --git a/packages/flutter_tools/templates/app/linux.tmpl/flutter/CMakeLists.txt b/packages/flutter_tools/templates/app/linux.tmpl/flutter/CMakeLists.txt index 94f43ff7fa..4f48a7ced5 100644 --- a/packages/flutter_tools/templates/app/linux.tmpl/flutter/CMakeLists.txt +++ b/packages/flutter_tools/templates/app/linux.tmpl/flutter/CMakeLists.txt @@ -24,6 +24,7 @@ find_package(PkgConfig REQUIRED) pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0) pkg_check_modules(GLIB REQUIRED IMPORTED_TARGET glib-2.0) pkg_check_modules(GIO REQUIRED IMPORTED_TARGET gio-2.0) +pkg_check_modules(BLKID REQUIRED IMPORTED_TARGET blkid) set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/libflutter_linux_gtk.so") @@ -65,6 +66,7 @@ target_link_libraries(flutter INTERFACE PkgConfig::GTK PkgConfig::GLIB PkgConfig::GIO + PkgConfig::BLKID ) add_dependencies(flutter flutter_assemble) diff --git a/packages/flutter_tools/test/general.shard/linux/linux_doctor_test.dart b/packages/flutter_tools/test/general.shard/linux/linux_doctor_test.dart index 9346b7c5e8..ac27a7812f 100644 --- a/packages/flutter_tools/test/general.shard/linux/linux_doctor_test.dart +++ b/packages/flutter_tools/test/general.shard/linux/linux_doctor_test.dart @@ -61,6 +61,7 @@ List _librariesPresentCommands() { FakeCommand(command: ['pkg-config', '--exists', 'gtk+-3.0']), FakeCommand(command: ['pkg-config', '--exists', 'glib-2.0']), FakeCommand(command: ['pkg-config', '--exists', 'gio-2.0']), + FakeCommand(command: ['pkg-config', '--exists', 'blkid']), ]; } @@ -73,6 +74,7 @@ List _librariesMissingCommands() { exitCode: 1, ), FakeCommand(command: ['pkg-config', '--exists', 'gio-2.0']), + FakeCommand(command: ['pkg-config', '--exists', 'blkid']), ]; }