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.
epel10
Petr Menšík 2 years ago
parent 65dbacc4c1
commit f77d653d29

@ -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 <pemensik@redhat.com> - 1.7.15-1
- Update to 1.7.15
- Export also CMake module
* Wed Jan 18 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.14-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild

Loading…
Cancel
Save