Switch to the CMake build system #387
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This fixes building the Flatpak version with the KDE 6.8 runtime and ffmpeg 7.0.2 (or ffmpeg-full).
Since Qt recommends CMake, qmake is likely to become less reliable in the long run.
Using CMake, with or without Ninja, provides build progress and speeds up the build.
It also makes it easier to build in a subdirectory to keep the source folder clean.
An .rc file is required to embed the icon and metadata in the Windows build.
Qt doesn't (yet?) provide a way to generate this file with CMake, so I've reused the one created by qmake.
Unlike add_executable, qt_add_executable cannot be called without specifying sources upfront, so we cannot use target_* commands before it.
qt_add_translations adds an update_translations target, so with the command
we can update translations before the build.
Using ffmpeg-full speeds up the build and reduces the Flatpak file size.