From f77d653d296bcb9f387a1277a38928f1e24d8141 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= Date: Wed, 1 Mar 2023 13:26:42 +0100 Subject: [PATCH] Export also CMake module Allow using this library directly from CMake. Release makes it possible and it can be alternative to pkg-config. Recent etlegacy requires the cmake module. --- cjson.spec | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cjson.spec b/cjson.spec index 2f2dbe9..54e8bcf 100644 --- a/cjson.spec +++ b/cjson.spec @@ -18,6 +18,7 @@ done with. It's a single file of C, and a single header file. Summary: Development files for cJSON Requires: %{name}%{?_isa} = %{version}-%{release} Requires: pkgconfig +Requires: cmake-filesystem %description devel The %{name}-devel package contains libraries and header files for @@ -27,13 +28,12 @@ developing applications that use cJSON. %autosetup -n cJSON-%{version} %build -%cmake -DENABLE_CJSON_TEST=ON +%cmake -DENABLE_CJSON_TEST=ON -DENABLE_TARGET_EXPORT=ON %cmake_build %install %cmake_install rm -f %{buildroot}%{_libdir}/*.{la,a} -rm -f %{buildroot}%{_libdir}/cmake/cJSON/*.cmake %check %ctest @@ -50,11 +50,13 @@ rm -f %{buildroot}%{_libdir}/cmake/cJSON/*.cmake %doc CHANGELOG.md CONTRIBUTORS.md %{_libdir}/libcjson.so %{_libdir}/pkgconfig/libcjson.pc +%{_libdir}/cmake/cJSON/ %{_includedir}/cjson/ %changelog * Wed Mar 01 2023 Petr Menšík - 1.7.15-1 - Update to 1.7.15 +- Export also CMake module * Wed Jan 18 2023 Fedora Release Engineering - 1.7.14-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild