Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:wolfi323:branches:KDE:Frameworks5
calligra4
Support-building-with-OpenEXR-3.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File Support-building-with-OpenEXR-3.patch of Package calligra4
From 5a720e94e62b8ae4a17dc8bee844f0baee923a9b Mon Sep 17 00:00:00 2001 From: Antonio Rojas <arojas@archlinux.org> Date: Fri, 23 Apr 2021 23:42:14 +0200 Subject: [PATCH] Support building with OpenEXR 3 Try to find OpenEXR 3 first via the upstream cmake config and fallback to using our FindOpenEXR --- CMakeLists.txt | 11 ++++++++--- libs/image/CMakeLists.txt | 2 +- libs/pigment/CMakeLists.txt | 2 +- plugins/color/lcms2engine/CMakeLists.txt | 6 +++--- plugins/color/lcms2engine/tests/CMakeLists.txt | 2 +- plugins/impex/CMakeLists.txt | 2 +- plugins/impex/exr/exr_converter.cc | 2 ++ plugins/impex/raw/CMakeLists.txt | 2 +- 8 files changed, 18 insertions(+), 11 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d2aaadf6fe..bc6a0207e9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -270,9 +270,15 @@ ## Check for OpenEXR ## -macro_optional_find_package(OpenEXR) -macro_bool_to_01(OPENEXR_FOUND HAVE_OPENEXR) -macro_log_feature(OPENEXR_FOUND "OpenEXR" "High dynamic-range (HDR) image file format" "http://www.openexr.com" FALSE "" "Required by the Krita OpenEXR filter") +find_package(OpenEXR 3.0 CONFIG QUIET) +if(TARGET OpenEXR::OpenEXR) + set(OPENEXR_LIBRARIES OpenEXR::OpenEXR) +else() + macro_optional_find_package(OpenEXR) + set(OpenEXR_FOUND ${OPENEXR_FOUND}) +endif() +macro_bool_to_01(OpenEXR_FOUND HAVE_OPENEXR) +macro_log_feature(OpenEXR_FOUND "OpenEXR" "High dynamic-range (HDR) image file format" "http://www.openexr.com" FALSE "" "Required by the Krita OpenEXR filter") ## ## Look for OpenGL diff --git a/krita/CMakeLists.txt b/krita/CMakeLists.txt index d2aaadf6fe..bc6a0207e9 100644 --- a/krita/CMakeLists.txt +++ b/krita/CMakeLists.txt @@ -70,7 +70,7 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config-powf.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-powf.h) set(LINK_OPENEXR_LIB) -if(OPENEXR_FOUND) +if(OpenEXR_FOUND) include_directories(${OPENEXR_INCLUDE_DIR}) set(LINK_OPENEXR_LIB ${OPENEXR_LIBRARIES}) add_definitions(${OPENEXR_DEFINITIONS}) diff --git a/krita/image/CMakeLists.txt b/krita/image/CMakeLists.txt index 79e5b55059..4841ab139d 100644 --- a/krita/image/CMakeLists.txt +++ b/krita/image/CMakeLists.txt @@ -312,7 +312,7 @@ message("DEBUG_BOOST_SYSTEM_FOUND = " ${Boost_SYSTEM_FOUND}) message("DEBUG_BOOST_SYSTEM_LIBRARY = " ${Boost_SYSTEM_LIBRARY}) -if(OPENEXR_FOUND) +if(OpenEXR_FOUND) target_link_libraries(kritaimage ${OPENEXR_LIBRARIES}) endif() diff --git a/libs/pigment/CMakeLists.txt b/libs/pigment/CMakeLists.txt index 2da577f043..8c1a70f4c7 100644 --- a/libs/pigment/CMakeLists.txt +++ b/libs/pigment/CMakeLists.txt @@ -12,7 +12,7 @@ include_directories( set(FILE_OPENEXR_SOURCES) set(LINK_OPENEXR_LIB) -if(OPENEXR_FOUND) +if(OpenEXR_FOUND) include_directories(${OPENEXR_INCLUDE_DIR}) set(LINK_OPENEXR_LIB ${OPENEXR_LIBRARIES}) add_definitions(${OPENEXR_DEFINITIONS}) diff --git a/plugins/colorengines/lcms2/CMakeLists.txt b/plugins/colorengines/lcms2/CMakeLists.txt index e14de2ba7c..04d0841953 100644 --- a/plugins/colorengines/lcms2/CMakeLists.txt +++ b/plugins/colorengines/lcms2e/CMakeLists.txt @@ -29,7 +29,7 @@ include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/colorprofiles ) -if (HAVE_LCMS24 AND OPENEXR_FOUND) +if (HAVE_LCMS24 AND OpenEXR_FOUND) include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/colorspaces/gray_f16 ${CMAKE_CURRENT_SOURCE_DIR}/colorspaces/rgb_f16 @@ -39,7 +39,7 @@ endif () set(FILE_OPENEXR_SOURCES) set(LINK_OPENEXR_LIB) -if(OPENEXR_FOUND) +if(OpenEXR_FOUND) include_directories(${OPENEXR_INCLUDE_DIR}) set(LINK_OPENEXR_LIB ${OPENEXR_LIBRARIES}) add_definitions(${OPENEXR_DEFINITIONS}) @@ -78,7 +78,7 @@ set ( lcmsengine_SRCS LcmsEnginePlugin.cpp ) -if (HAVE_LCMS24 AND OPENEXR_FOUND) +if (HAVE_LCMS24 AND OpenEXR_FOUND) set ( lcmsengine_SRCS ${lcmsengine_SRCS} colorspaces/gray_f16/GrayF16ColorSpace.cpp diff --git a/plugins/colorengines/lcms2/tests/CMakeLists.txt b/plugins/colorengines/lcms2/tests/CMakeLists.txt index b548dfa19f..2bcddec635 100644 --- a/plugins/colorengines/lcms2/tests/CMakeLists.txt +++ b/plugins/colorengines/lcms2/tests/CMakeLists.txt @@ -14,7 +14,7 @@ include_directories( ../colorspaces/cmyk_u16 ../colorprofiles .. ) -if(OPENEXR_FOUND) +if(OpenEXR_FOUND) include_directories(${OPENEXR_INCLUDE_DIR}) endif() include_directories( ${PIGMENT_INCLUDES} ${LCMS2_INCLUDE_DIR} ) diff --git a/krita/plugins/formats/CMakeLists.txt b/krita/plugins/formats/CMakeLists.txt index 499b1c97d0..82d936575b 100644 --- a/krita/plugins/formats/CMakeLists.txt +++ b/krita/plugins/formats/CMakeLists.txt @@ -35,7 +35,7 @@ if(PNG_FOUND) add_subdirectory(png) endif() -if(OPENEXR_FOUND) +if(OpenEXR_FOUND) add_subdirectory(exr) endif() diff --git a/krita/plugins/formats/exr/exr_converter.cc b/plugins/formats/exr/exr_converter.cc index bde4784379..4f90c25a1f 100644 --- a/krita/plugins/formats/exr/exr_converter.cc +++ b/krita/plugins/formats/exr/exr_converter.cc @@ -24,6 +24,8 @@ #include <ImfAttribute.h> #include <ImfChannelList.h> +#include <ImfFrameBuffer.h> +#include <ImfHeader.h> #include <ImfInputFile.h> #include <ImfOutputFile.h> diff --git a/krita/plugins/formats/raw/CMakeLists.txt b/krita/plugins/formats/raw/CMakeLists.txt index 71cb5b355c..f65bc770a5 100644 --- a/krita/plugins/formats/raw/CMakeLists.txt +++ b/krita/plugins/formats/raw/CMakeLists.txt @@ -1,6 +1,6 @@ -if(OPENEXR_FOUND) +if(OpenEXR_FOUND) include_directories(${OPENEXR_INCLUDE_DIR}) endif() -- 2.32.0
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor