"subdir" in flatpak json for cmake-ninja buildsystem is not respected
Affected version
- Nightly flatpak: Yes
- Other: Ubuntu 22.04
Steps to reproduce
Given a monorepo project with the following layout:
Project/
CMakeLists.txt
Libs/
LibA
PrimaryApp/
SecondaryApp/
CMakeLists.txt
GTK/
com.example.SecondaryApp.json
Where SecondaryApp is a collection of "Ports" of some fraction of the monorepo, and not the PrimaryApp that's meant to be built with the top level CMakeLists.txt.
In order to build the flatpak for the SecondaryApp, the contents of the .json contain a module like so:
{
"name": "SecondaryApp",
"buildsystem": "cmake-ninja",
"subdir": "SecondaryApp",
"builddir": true,
"sources": [
{
"type": "dir",
"path": "../..",
}
],
}
Current behavior
flatpak-builder
passes Project/SecondaryApp/ as the CMake Source Sirectory. i.e. the -S flag.
Builder
seems to pass the top level CMakeLists.txt no matter what.
Expected behavior
Both methods of building the application should pass the subdirectory CMakeLists.txt to the build, while using the top level directory as the context for the IDE (as it includes things like the required LibA used by SecondaryApp).
Additional information
This is the actual project in question: https://github.com/ADKaster/serenity/blob/single-commit-gtk4/Ladybird/GTK/org.serenityos.Ladybird-gtk4.json#L100
cc @bugaevc