mirror of
https://invent.kde.org/frameworks/kimageformats.git
synced 2025-05-28 00:30:23 -04:00
We now support up to and including version 11 of the XCF format, earlier it only supported version 1 (from 1997, according to the XCF spec). Biggest difference seems to be that they changed to 64bit for offsets from version 11 and upwards, otherwise it's mostly just newer enum values and theoretically major stuff that we don't really need to care about to get a thumbnail (e. g. linear vs. perceptual RGB). We still don't support all features, but now it handles that more gracefully and should at least create thumbnails that are usable. It should also be easier to update in the future if/when there comes new versions. Also added a test file created with the latest version of Gimp (2.10.18). Reviewed By: aacid Differential Revision: https://phabricator.kde.org/D25937
62 lines
1.9 KiB
CMake
62 lines
1.9 KiB
CMake
cmake_minimum_required(VERSION 3.5)
|
|
|
|
project(KImageFormats)
|
|
|
|
set (CMAKE_CXX_STANDARD 14)
|
|
|
|
include(FeatureSummary)
|
|
find_package(ECM 5.69.0 NO_MODULE)
|
|
set_package_properties(ECM PROPERTIES TYPE REQUIRED DESCRIPTION "Extra CMake Modules." URL "https://commits.kde.org/extra-cmake-modules")
|
|
feature_summary(WHAT REQUIRED_PACKAGES_NOT_FOUND FATAL_ON_MISSING_REQUIRED_PACKAGES)
|
|
|
|
|
|
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
|
|
|
|
include(KDEInstallDirs)
|
|
include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE)
|
|
include(KDECMakeSettings)
|
|
|
|
|
|
include(CheckIncludeFiles)
|
|
|
|
set(REQUIRED_QT_VERSION 5.12.0)
|
|
find_package(Qt5Gui ${REQUIRED_QT_VERSION} REQUIRED NO_MODULE)
|
|
|
|
find_package(KF5Archive)
|
|
set_package_properties(KF5Archive PROPERTIES
|
|
TYPE OPTIONAL
|
|
PURPOSE "Required for the QImage plugin for Krita and OpenRaster images"
|
|
)
|
|
|
|
# EPS support depends on the gs utility; non-UNIX systems are unlikely to have
|
|
# this available in PATH
|
|
set(BUILD_EPS_PLUGIN FALSE)
|
|
if (UNIX)
|
|
find_package(Qt5PrintSupport ${REQUIRED_QT_VERSION} NO_MODULE)
|
|
set_package_properties(Qt5PrintSupport PROPERTIES
|
|
PURPOSE "Required for the QImage plugin for EPS images"
|
|
TYPE OPTIONAL
|
|
)
|
|
if (Qt5PrintSupport_FOUND)
|
|
set(BUILD_EPS_PLUGIN TRUE)
|
|
endif()
|
|
endif()
|
|
|
|
find_package(OpenEXR)
|
|
set_package_properties(OpenEXR PROPERTIES
|
|
TYPE OPTIONAL
|
|
PURPOSE "Required for the QImage plugin for OpenEXR images"
|
|
)
|
|
add_definitions(-DQT_NO_FOREACH)
|
|
# 050d00 (5.13) triggers a BIC in qimageiohandler.h, in Qt 5.13, so do not enable that until we can require 5.14
|
|
# https://codereview.qt-project.org/c/qt/qtbase/+/279215
|
|
add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x050c00)
|
|
add_definitions(-DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x054400)
|
|
add_subdirectory(src)
|
|
if (BUILD_TESTING)
|
|
add_subdirectory(autotests)
|
|
add_subdirectory(tests)
|
|
endif()
|
|
|
|
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
|