Skip to content

Commit

Permalink
flutter: Don't look for Qt includes when generating bindings
Browse files Browse the repository at this point in the history
The Qt dependency is gone
  • Loading branch information
iamsergio committed Apr 12, 2024
1 parent 85a3e2b commit ee094b6
Showing 1 changed file with 0 additions and 34 deletions.
34 changes: 0 additions & 34 deletions src/flutter/utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ final String s_libraryPathEnvVariable = Platform.isWindows
? "DYLD_LIBRARY_PATH"
: "";

final String s_qtIncludePath = qtIncludePath();
final String s_qtLibraryPath = qtLibPath();

/**
* Returns the library filename according to the operating system.
*/
Expand Down Expand Up @@ -111,45 +108,14 @@ Future<int> getPackages(
workingDirectory: workingDirectory, printOnly: printOnly);
}

/**
* Runs qmake -query
*/
String qmakeQuery(String key) {
ProcessResult result = Process.runSync('qmake', ['-query']);

for (String line in result.stdout.toString().split("\n")) {
if (line.startsWith('${key}:')) {
line = line.replaceAll('${key}:', '');
line = line.trim();
return line;
}
}

return "";
}

String qtIncludePath() {
return qmakeQuery('QT_INSTALL_HEADERS');
}

String qtLibPath() {
return qmakeQuery('QT_INSTALL_LIBS');
}

List<String> includeArguments() {
if (Platform.isMacOS) {
return [
"-I${s_qtLibraryPath}/QtCore.framework/Headers",
"-I${s_qtLibraryPath}/QtGui.framework/Headers",
"-F${s_qtLibraryPath}",
"-I..",
"-Iviews/"
];
} else {
return [
"-I${s_qtIncludePath}",
"-I${s_qtIncludePath}/QtCore",
"-I${s_qtIncludePath}/QtGui",
"-I..",
"-I../3rdparty",
"-I../fwd_headers",
Expand Down

0 comments on commit ee094b6

Please sign in to comment.