Merged
[sync] PR-16: fix build with cmake 4 #17
openeuler-ci-botAdd on Aug 19
[sync] PR-16: fix build with cmake 4 #17
Merged
Total: 2 files changed+26-15
| @@ -0,0 +1,10 @@ | |||
| 1 | +diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
| 2 | +index fbaffc9..9ee0968 100644 | ||
| 3 | +--- a/CMakeLists.txt | ||
| 4 | ++++ b/CMakeLists.txt | ||
| 5 | +@@ -1,4 +1,4 @@ | ||
| 6 | +-cmake_minimum_required(VERSION 3.1) | ||
| 7 | ++cmake_minimum_required(VERSION 3.1...${CMAKE_VERSION}) | ||
| 8 | + project(libuvc | ||
| 9 | + VERSION 0.0.7 | ||
| 10 | + LANGUAGES C | ||
| @@ -1,12 +1,11 @@ | |||
| 1 | -%global debug_package %{nil} | ||
| 2 | - | ||
| 3 | Name: libuvc | 1 | Name: libuvc |
| 4 | Version: 0.0.7 | 2 | Version: 0.0.7 |
| 5 | -Release: 2 | 3 | +Release: 3 |
| 6 | Summary: A cross-platform library for USB video devices | 4 | Summary: A cross-platform library for USB video devices |
| 7 | -License: BSD | 5 | +License: BSD-3-Clause |
| 8 | -URL: https://github.com/libuvc/lubuvc | 6 | +URL: https://github.com/libuvc/libuvc |
| 9 | -Source0: v%{version}.tar.gz | 7 | +Source0: https://github.com/libuvc/libuvc/archive/refs/tags/v%{version}.tar.gz |
| 8 | +Patch0: libuvc-cmake4.patch | ||
| 10 | 9 | ||
| 11 | BuildRequires: gcc | 10 | BuildRequires: gcc |
| 12 | BuildRequires: cmake | 11 | BuildRequires: cmake |
| @@ -18,7 +17,8 @@ A cross-platform library for USB video devices. | |||
| 18 | 17 | ||
| 19 | %package devel | 18 | %package devel |
| 20 | Summary: Development files for libuvc | 19 | Summary: Development files for libuvc |
| 21 | -Requires: %{name} = %{version}-%{release} | 20 | +Requires: %{name}%{?_isa} = %{version}-%{release} |
| 21 | +Conflicts: %{name} < 0.0.7-3 | ||
| 22 | 22 | ||
| 23 | %description devel | 23 | %description devel |
| 24 | The devel package contains development files for libuvc. | 24 | The devel package contains development files for libuvc. |
| @@ -28,27 +28,28 @@ It provides header files and libraries for libuvc. | |||
| 28 | %autosetup -p1 -n %{name}-%{version} | 28 | %autosetup -p1 -n %{name}-%{version} |
| 29 | 29 | ||
| 30 | %build | 30 | %build |
| 31 | -mkdir build && cd build | 31 | +%cmake |
| 32 | -cmake \ | 32 | +%cmake_build |
| 33 | - -DCMAKE_INSTALL_PREFIX="/usr" \ | ||
| 34 | - -DCMAKE_INSTALL_DATADIR="%{_libdir}" \ | ||
| 35 | - .. | ||
| 36 | -make | ||
| 37 | 33 | ||
| 38 | %install | 34 | %install |
| 39 | -%make_install -C build | 35 | +%cmake_install |
| 40 | 36 | ||
| 41 | %files | 37 | %files |
| 42 | -%{_libdir}/%{name}*.so* | 38 | +%{_libdir}/*.so.* |
| 43 | 39 | ||
| 44 | %files devel | 40 | %files devel |
| 45 | %{_includedir}/* | 41 | %{_includedir}/* |
| 42 | +%{_libdir}/*.so | ||
| 46 | %{_libdir}/pkgconfig/*.pc | 43 | %{_libdir}/pkgconfig/*.pc |
| 47 | %{_libdir}/cmake/* | 44 | %{_libdir}/cmake/* |
| 48 | %{_libdir}/%{name}.a | 45 | %{_libdir}/%{name}.a |
| 49 | 46 | ||
| 50 | %changelog | 47 | %changelog |
| 48 | +* Sat Jul 18 2026 Funda Wang <fundawang@yeah.net> - 0.0.7-3 | ||
| 49 | +- fix build with cmake 4 | ||
| 50 | + | ||
| 51 | * Fri Dec 15 2023 davidhan008 <619409713@qq.com> - 0.0.7-2 | 51 | * Fri Dec 15 2023 davidhan008 <619409713@qq.com> - 0.0.7-2 |
| 52 | - Add cmake depence | 52 | - Add cmake depence |
| 53 | + | ||
| 53 | * Wed May 3 2023 will_niutao <niutao2@huawei.com> - 0.0.7-1 | 54 | * Wed May 3 2023 will_niutao <niutao2@huawei.com> - 0.0.7-1 |
| 54 | - Init for openEuler | 55 | - Init for openEuler |