]> git.pld-linux.org Git - packages/libjxl.git/commitdiff
add tests bcond (keep disabled by default) and make test deps conditional
authorJan Palus <atler@pld-linux.org>
Sat, 9 Jul 2022 17:53:17 +0000 (19:53 +0200)
committerJan Palus <atler@pld-linux.org>
Sat, 9 Jul 2022 17:53:17 +0000 (19:53 +0200)
libjxl.spec

index 8a39dde2133d19f2d47372f3a493ea63de5ae60b..68db3f1b196c695319e154563c65067707e5dbc0 100644 (file)
@@ -1,3 +1,7 @@
+#
+# Conditional build:
+%bcond_with    tests           # build tests
+
 Summary:       JPEG XL reference implementation
 Summary(pl.UTF-8):     Referencyjna implementacja JPEG XL
 Name:          libjxl
@@ -19,9 +23,11 @@ BuildRequires:       doxygen
 BuildRequires: gdk-pixbuf2-devel >= 2.38
 BuildRequires: giflib-devel >= 5
 BuildRequires: gimp-devel >= 1:2.10
+%if %{with tests}
 BuildRequires: gmock-devel
 BuildRequires: google-benchmark-devel
 BuildRequires: gtest-devel
+%endif
 BuildRequires: highway-devel >= 0.15.0
 BuildRequires: lcms2-devel >= 2.10
 BuildRequires: libavif-devel
@@ -33,7 +39,7 @@ BuildRequires:        libstdc++-devel >= 6:7
 BuildRequires: lodepng-devel
 BuildRequires: pkgconfig
 BuildRequires: python3-devel >= 1:3
-BuildRequires: rpmbuild(macros) >= 1.605
+BuildRequires: rpmbuild(macros) >= 1.742
 # for gdk-pixbuf loader only (the rest uses lcms2 by default)
 BuildRequires: skcms-devel
 BuildRequires: zlib-devel
@@ -129,7 +135,7 @@ Wtyczka wczytująca/zapisująca pliki JPEG XL dla GIMP-a.
 install -d build
 cd build
 %cmake .. \
-       -DBUILD_TESTING=OFF \
+       %{cmake_on_off tests BUILD_TESTING} \
        -DJPEGXL_ENABLE_PLUGINS=ON \
        -DJPEGXL_ENABLE_SJPEG=OFF \
        -DJPEGXL_ENABLE_SKCMS=OFF \
This page took 0.251993 seconds and 4 git commands to generate.