forked from Chatterino/chatterino2
-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use
kimageformats
to decode AVIF (#230)
- Loading branch information
Showing
18 changed files
with
568 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ Local dev machines for testing are available on Apple Silicon on macOS 13. | |
1. Install [Homebrew](https://brew.sh/#install) | ||
We use this for dependency management on macOS | ||
1. Install all dependencies: | ||
`brew install boost [email protected] rapidjson cmake qt@5` | ||
`brew install boost [email protected] rapidjson cmake qt@5 libavif` | ||
|
||
## Building | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
find_package(libavif) | ||
|
||
if (libavif_FOUND) | ||
set(kimageformats_SRC ${CMAKE_SOURCE_DIR}/lib/kimageformats/src/imageformats) | ||
|
||
add_library(kimageformats STATIC ${kimageformats_SRC}/avif.cpp) | ||
set_target_properties(kimageformats PROPERTIES AUTOMOC ON) | ||
target_link_libraries(kimageformats PRIVATE Qt${MAJOR_QT_VERSON}::Gui avif) | ||
target_compile_definitions(kimageformats PRIVATE QT_STATICPLUGIN) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule kimageformats
added at
bcb530
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
include(${CMAKE_SOURCE_DIR}/cmake/AVIF.cmake) | ||
|
||
add_library(chatterino-qt-plugins OBJECT ${CMAKE_CURRENT_LIST_DIR}/QtPlugins.cpp) | ||
target_link_libraries(chatterino-qt-plugins PRIVATE Qt${MAJOR_QT_VERSION}::Core Qt${MAJOR_QT_VERSION}::Gui) | ||
target_compile_definitions(chatterino-qt-plugins PRIVATE QT_STATICPLUGIN) | ||
|
||
if (libavif_FOUND) | ||
target_compile_definitions(chatterino-qt-plugins PRIVATE WITH_AVIF) | ||
target_link_libraries(chatterino-qt-plugins PRIVATE kimageformats) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#pragma once | ||
|
||
#include <QtCore/QtPlugin> | ||
|
||
#ifdef WITH_AVIF | ||
Q_IMPORT_PLUGIN(QAVIFPlugin) | ||
#endif |
Oops, something went wrong.
42bd526
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
kimageformats does not support qt5 FYI: KDE/kimageformats@4451737
QT 6.5 is currently required: KDE/kimageformats@adc7da4
42bd526
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for checking, but this fork isn't using the master branch - it's using the
kf5
branch, which still supports Qt 5. Both commits you linked are not on this branch.42bd526
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.