Open Losses opened 2 months ago
Thank you for sending this PR.
Introducing necessary configurations in CMakeLists.txt to ensure the correct discovery and linking of package directories during cross-compilation. The changes include:
X11, Wayland, and DRM are independent of each other, and aside from common dependency libraries, they are not required for building an application. For example, in the case of X11, the Wayland libraries are unnecessary.
If you want to proceed with this change, you will need to implement code that checks for only the necessary components depending on the type of backend.
- Fix for Diverse Compiler Invocation Commands
This looks good to me.
It seems we need to find a way for CMake to know which dependencies it requires. This is a bit complex to me, so please give me some time to think about this issue.
I suppose FLUTTER_TARGET_BACKEND_TYPE
var can be used to identify which dependencies are needed.
https://github.com/sony/flutter-elinux/blob/main/templates/app/CMakeLists.txt.tmpl#L28
This pull request includes two key modifications to address potential issues in the cross-compilation process:
1. Configuration Updates in
CMakeLists.txt
Introducing necessary configurations in
CMakeLists.txt
to ensure the correct discovery and linking of package directories during cross-compilation. The changes include:Problem Addressed:
Previously, the build system struggled to correctly locate package directories during cross-compilation, leading to build failures. These changes ensure that the necessary packages and libraries are correctly found and linked, thereby facilitating a successful build process.
2. Fix for Diverse Compiler Invocation Commands
Resolving issues related to cross-platform compilation on certain operating systems, such as NixOS, by supporting diverse compiler invocation commands.
Details:
clang
andclang++
. However, different operating systems might use different commands. For instance, on NixOS, the commands areaarch64-unknown-linux-gnu-clang
andaarch64-unknown-linux-gnu-clang++
.Problem Addressed:
Certain operating systems were unable to complete cross-platform compilation due to hardcoded compiler invocation commands. By allowing customizable compiler commands, this fix enhances the project's cross-platform compatibility.
Potentially related to #159, since an incorrect compiler could trigger the same error.