Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.
C++
Adjust CMake code to Qt6 name of KDcraw
Nicolas Fella4977499f5024
diff --git a/CMakeLists.txt b/CMakeLists.txtindex 75562dbabb..1f05b570aa 100644--- a/CMakeLists.txt+++ b/CMakeLists.txt@@ -1210,13 +1210,23 @@ set_package_properties(QUAZIP PROPERTIES#### Test for KDcraw##-find_package(KF5KDcraw 5.0.0)-set_package_properties(KF5KDcraw PROPERTIES- DESCRIPTION "A thread-safe wrapper around libraw"- URL "https://api.kde.org/libkdcraw/html/index.html"- TYPE OPTIONAL- PURPOSE "Needed for reading RAW files"-)+if (QT_MAJOR_VERSION STREQUAL "6")+ find_package(KDcrawQt6 5.0.0)+ set_package_properties(KDcrawQt6 PROPERTIES+ DESCRIPTION "A thread-safe wrapper around libraw"+ URL "https://api.kde.org/libkdcraw/html/index.html"+ TYPE OPTIONAL+ PURPOSE "Needed for reading RAW files"+ )+else()+ find_package(KF5KDcraw 5.0.0)+ set_package_properties(KF5KDcraw PROPERTIES+ DESCRIPTION "A thread-safe wrapper around libraw"+ URL "https://api.kde.org/libkdcraw/html/index.html"+ TYPE OPTIONAL+ PURPOSE "Needed for reading RAW files"+ )+endif()#### Check for freetypediff --git a/plugins/impex/CMakeLists.txt b/plugins/impex/CMakeLists.txtindex 348b9639ed..802e58e3e9 100644--- a/plugins/impex/CMakeLists.txt+++ b/plugins/impex/CMakeLists.txt@@ -27,7 +27,7 @@ if(OpenJPEG_FOUND AND NOT ${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")add_subdirectory(jp2)endif()-if(KF5KDcraw_FOUND)+if(KF5KDcraw_FOUND OR KDcrawQt6_FOUND)add_subdirectory(raw)endif()diff --git a/plugins/impex/raw/CMakeLists.txt b/plugins/impex/raw/CMakeLists.txtindex 40fb7aee7f..4e025ff2b6 100644--- a/plugins/impex/raw/CMakeLists.txt+++ b/plugins/impex/raw/CMakeLists.txt@@ -18,7 +18,13 @@ ki18n_wrap_ui(krita_raw_import_SOURCES)kis_add_library(krita_raw_import MODULE ${krita_raw_import_SOURCES})-target_link_libraries(krita_raw_import kritaui KF${KF_MAJOR}::KDcraw kritaexifcommon)+target_link_libraries(krita_raw_import kritaui kritaexifcommon)++if (QT_MAJOR_VERSION STREQUAL "6")+ target_link_libraries(krita_raw_import KDcrawQt6)+else()+ target_link_libraries(krita_raw_import KF5::KDcraw)+endif()install(TARGETS krita_raw_import DESTINATION ${KRITA_PLUGIN_INSTALL_DIR})