Drop gtest on RHEL
This commit is contained in:
parent
74fe8c1c53
commit
deb6ac34d7
|
@ -0,0 +1,37 @@
|
||||||
|
From e279707a001c8f95f8a2bc51c0d19bf35bfc79ab Mon Sep 17 00:00:00 2001
|
||||||
|
From: Wan-Teh Chang <wtc@google.com>
|
||||||
|
Date: Fri, 11 Nov 2022 14:08:33 -0800
|
||||||
|
Subject: [PATCH] Build aviftest_helpers for are_images_equal.cc
|
||||||
|
|
||||||
|
If are_images_equal.cc is built, enable CXX and build the
|
||||||
|
aviftest_helpers library.
|
||||||
|
|
||||||
|
Fix the build failure when -DAVIF_BUILD_APPS=ON -DAVIF_BUILD_TESTS=ON
|
||||||
|
-DAVIF_ENABLE_GTEST=OFF is passed to the cmake command.
|
||||||
|
|
||||||
|
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
|
||||||
|
index 5af7ea560..632ba7a71 100644
|
||||||
|
--- a/tests/CMakeLists.txt
|
||||||
|
+++ b/tests/CMakeLists.txt
|
||||||
|
@@ -39,15 +39,17 @@ foreach(AVIFYUV_MODE limited rgb) # Modes drift and premultiply take more than 2
|
||||||
|
add_test(NAME avifyuv_${AVIFYUV_MODE} COMMAND avifyuv -m ${AVIFYUV_MODE})
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
-################################################################################
|
||||||
|
-# GoogleTest
|
||||||
|
-
|
||||||
|
-if(AVIF_ENABLE_GTEST)
|
||||||
|
+if(AVIF_ENABLE_GTEST OR AVIF_BUILD_APPS)
|
||||||
|
enable_language(CXX)
|
||||||
|
set(CMAKE_CXX_STANDARD 11)
|
||||||
|
add_library(aviftest_helpers OBJECT gtest/aviftest_helpers.cc)
|
||||||
|
target_link_libraries(aviftest_helpers avif_apps)
|
||||||
|
+endif()
|
||||||
|
|
||||||
|
+################################################################################
|
||||||
|
+# GoogleTest
|
||||||
|
+
|
||||||
|
+if(AVIF_ENABLE_GTEST)
|
||||||
|
if(AVIF_LOCAL_GTEST)
|
||||||
|
set(GTEST_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/ext/googletest/googletest/include)
|
||||||
|
set(GTEST_LIBRARIES
|
12
libavif.spec
12
libavif.spec
|
@ -2,11 +2,16 @@
|
||||||
%bcond_without aom
|
%bcond_without aom
|
||||||
# Build SVT-AV1
|
# Build SVT-AV1
|
||||||
%bcond_without svt
|
%bcond_without svt
|
||||||
%if 0%{?rhel} && 0%{?rhel} < 9
|
%if (0%{?rhel} && 0%{?rhel} < 9) || 0%{?rhel} >= 10
|
||||||
%bcond_with rav1e
|
%bcond_with rav1e
|
||||||
%else
|
%else
|
||||||
%bcond_without rav1e
|
%bcond_without rav1e
|
||||||
%endif
|
%endif
|
||||||
|
%if 0%{?rhel} >= 10
|
||||||
|
%bcond_with gtest
|
||||||
|
%else
|
||||||
|
%bcond_without gtest
|
||||||
|
%endif
|
||||||
%bcond_without check
|
%bcond_without check
|
||||||
|
|
||||||
Name: libavif
|
Name: libavif
|
||||||
|
@ -17,10 +22,11 @@ Summary: Library for encoding and decoding .avif files
|
||||||
License: BSD-2-Clause
|
License: BSD-2-Clause
|
||||||
URL: https://github.com/AOMediaCodec/libavif
|
URL: https://github.com/AOMediaCodec/libavif
|
||||||
Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
|
Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
|
||||||
|
Patch0: libavif-0.11.1-build_tests_fix.patch
|
||||||
|
|
||||||
BuildRequires: cmake
|
BuildRequires: cmake
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
%{?with_check:BuildRequires: gtest-devel}
|
%{?with_check:%{?with_gtest:BuildRequires: gtest-devel}}
|
||||||
BuildRequires: nasm
|
BuildRequires: nasm
|
||||||
%if %{with aom}
|
%if %{with aom}
|
||||||
BuildRequires: pkgconfig(aom)
|
BuildRequires: pkgconfig(aom)
|
||||||
|
@ -76,7 +82,7 @@ Avif-pixbuf-loader contains a plugin to load AVIF images in GTK+ applications.
|
||||||
%{?with_svt:-DAVIF_CODEC_SVT=1} \
|
%{?with_svt:-DAVIF_CODEC_SVT=1} \
|
||||||
-DAVIF_BUILD_APPS=1 \
|
-DAVIF_BUILD_APPS=1 \
|
||||||
-DAVIF_BUILD_GDK_PIXBUF=1 \
|
-DAVIF_BUILD_GDK_PIXBUF=1 \
|
||||||
%{?with_check:-DAVIF_BUILD_TESTS=1 -DAVIF_ENABLE_GTEST=1}
|
%{?with_check:-DAVIF_BUILD_TESTS=1 -DAVIF_ENABLE_GTEST=%{with gtest}}
|
||||||
%cmake_build
|
%cmake_build
|
||||||
|
|
||||||
%install
|
%install
|
||||||
|
|
Loading…
Reference in New Issue