mirror of
https://invent.kde.org/frameworks/kimageformats.git
synced 2026-02-19 23:13:12 -05:00
jxl: support both old 0.6.1 and new 0.7.0 libjxl API
New libjxl API changed the way how lossless 16bit depth images must be encoded: codestream level 10 must be set, which implies use of container format. Unfortunately, there isn’t version number inside libjxl header yet, so we must detect new version on cmake/PkgConfig level.
This commit is contained in:
@ -86,6 +86,9 @@ endif()
|
||||
if (LibJXL_FOUND AND LibJXLThreads_FOUND)
|
||||
kimageformats_add_plugin(kimg_jxl SOURCES jxl.cpp)
|
||||
target_link_libraries(kimg_jxl PkgConfig::LibJXL PkgConfig::LibJXLThreads)
|
||||
if (LibJXL_VERSION VERSION_GREATER_EQUAL "0.7.0")
|
||||
target_compile_definitions(kimg_jxl PRIVATE KIMG_JXL_API_VERSION=70)
|
||||
endif()
|
||||
install(FILES jxl.desktop DESTINATION ${KDE_INSTALL_KSERVICESDIR}/qimageioplugins/)
|
||||
endif()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user