From 7cdd24ae7677c56bbc33c981f442ec898ea52fad Mon Sep 17 00:00:00 2001 From: "jiyong.min" Date: Fri, 24 Mar 2023 08:40:48 +0900 Subject: [PATCH] Fix build error - The lcms2 requirement is changed according to Tizen. - Modified so that the third party libhwy is not installed. - The ARM_FP v2 is disable because it is not supported. Change-Id: Ia338bb44e6a037e9d261d921f8a26a276a63ba1a --- third_party/CMakeLists.txt | 6 +++++- third_party/highway/CMakeLists.txt | 2 ++ third_party/highway/hwy/base.h | 2 +- third_party/highway/hwy/ops/arm_neon-inl.h | 4 ++-- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/third_party/CMakeLists.txt b/third_party/CMakeLists.txt index 06826ee..45cd077 100644 --- a/third_party/CMakeLists.txt +++ b/third_party/CMakeLists.txt @@ -93,7 +93,11 @@ if (JPEGXL_ENABLE_SKCMS OR JPEGXL_ENABLE_PLUGINS) endif () if (JPEGXL_ENABLE_VIEWERS OR NOT JPEGXL_ENABLE_SKCMS) if( NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/lcms/.git" OR JPEGXL_FORCE_SYSTEM_LCMS2 ) - find_package(LCMS2 2.13) + if(__TIZEN__) + find_package(LCMS2 2.12) + else() + find_package(LCMS2 2.13) + endif() if ( NOT LCMS2_FOUND ) message(FATAL_ERROR "Please install lcms2 or run git submodule update --init") endif () diff --git a/third_party/highway/CMakeLists.txt b/third_party/highway/CMakeLists.txt index 81361b7..5e26982 100644 --- a/third_party/highway/CMakeLists.txt +++ b/third_party/highway/CMakeLists.txt @@ -50,7 +50,9 @@ set(HWY_WARNINGS_ARE_ERRORS OFF CACHE BOOL "Add -Werror flag?") set(HWY_ENABLE_CONTRIB ON CACHE BOOL "Include contrib/") set(HWY_ENABLE_EXAMPLES ON CACHE BOOL "Build examples") +if (NOT __TIZEN__) set(HWY_ENABLE_INSTALL ON CACHE BOOL "Install library") +endif() include(CheckCXXSourceCompiles) check_cxx_source_compiles( diff --git a/third_party/highway/hwy/base.h b/third_party/highway/hwy/base.h index c87fa96..284c9ec 100644 --- a/third_party/highway/hwy/base.h +++ b/third_party/highway/hwy/base.h @@ -255,7 +255,7 @@ static constexpr HWY_MAYBE_UNUSED size_t kMaxVectorSize = 16; // ACLE (https://gcc.gnu.org/onlinedocs/gcc/Half-Precision.html): // always supported on aarch64, for v7 only if -mfp16-format is given. -#if ((HWY_ARCH_ARM_A64 || (__ARM_FP & 2)) && HWY_COMPILER_GCC) +#if ((HWY_ARCH_ARM_A64 || (__ARM_FP & 2)) && HWY_COMPILER_GCC) && (!__TIZEN__) using float16_t = __fp16; // C11 extension ISO/IEC TS 18661-3:2015 but not supported on all targets. // Required for Clang RVV if the float16 extension is used. diff --git a/third_party/highway/hwy/ops/arm_neon-inl.h b/third_party/highway/hwy/ops/arm_neon-inl.h index 87edbcf..ebb43ac 100644 --- a/third_party/highway/hwy/ops/arm_neon-inl.h +++ b/third_party/highway/hwy/ops/arm_neon-inl.h @@ -3028,7 +3028,7 @@ HWY_API Vec128 PromoteTo(Simd /* tag */, return Vec128(vget_low_s64(vmovl_s32(v.raw))); } -#if __ARM_FP & 2 +#if (__ARM_FP & 2) && !(__TIZEN__) HWY_API Vec128 PromoteTo(Full128 /* tag */, const Vec128 v) { @@ -3157,7 +3157,7 @@ HWY_API Vec128 DemoteTo(Simd /* tag */, return Vec128(vqmovn_s16(vcombine_s16(v.raw, v.raw))); } -#if __ARM_FP & 2 +#if (__ARM_FP & 2) && !(__TIZEN__) HWY_API Vec128 DemoteTo(Full64 /* tag */, const Vec128 v) { -- 2.7.4