summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMoritz Haase <Moritz.Haase@bmw.de>2025-07-03 13:22:02 +0200
committerKhem Raj <raj.khem@gmail.com>2025-07-03 09:45:03 -0700
commitdb04122a4063b7416fddcfecffb1c09ba59eb97c (patch)
tree7ea5feabb2236841ec1d4de3b521f44085685df0
parent5ffd6f7cb7533adf1b04d67edf0ec27f75070e22 (diff)
downloadmeta-openembedded-db04122a4063b7416fddcfecffb1c09ba59eb97c.tar.gz
libftdi: Backport patches to support builds with CMake 4+
The commits have been merged upstream, but there hasn't been a release containing them yet (last upstream release was years ago). Pulling them in unblocks builds with CMake 4+ in the context of a patch series bumping CMake to 4.0.3 in openembedded-core (see [0]). [0]: https://lists.openembedded.org/g/openembedded-core/topic/113946576 CC: antonin.godard@bootlin.com CC: alex.kanavin@gmail.com Signed-off-by: Moritz Haase <Moritz.Haase@bmw.de> Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-oe/recipes-support/libftdi/files/0001-CMake-bump-the-minimal-required-version-to-2.8.12.patch86
-rw-r--r--meta-oe/recipes-support/libftdi/files/0002-CMake-require-2.8.12-for-cmake_example.patch24
-rw-r--r--meta-oe/recipes-support/libftdi/files/0003-CMake-bump-the-minimal-required-version-to-3.5.patch34
-rw-r--r--meta-oe/recipes-support/libftdi/libftdi_1.5.bb3
4 files changed, 147 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/libftdi/files/0001-CMake-bump-the-minimal-required-version-to-2.8.12.patch b/meta-oe/recipes-support/libftdi/files/0001-CMake-bump-the-minimal-required-version-to-2.8.12.patch
new file mode 100644
index 0000000000..544ea00c35
--- /dev/null
+++ b/meta-oe/recipes-support/libftdi/files/0001-CMake-bump-the-minimal-required-version-to-2.8.12.patch
@@ -0,0 +1,86 @@
1From 9b1419d46b156c3c61d30e761ee3636431187cc0 Mon Sep 17 00:00:00 2001
2From: Yegor Yefremov <yegorslists@googlemail.com>
3Date: Tue, 1 Aug 2023 11:53:35 +0200
4Subject: [PATCH] CMake: bump the minimal required version to 2.8.12
5
6The older CMake versions are deprecated.
7
8Remove support for CMake code compatible with CMake older than 2.8.8.
9
10Also move cmake_minimum_required() command before the project()
11command invocation.
12
13Signed-off-by: Moritz Haase <Moritz.Haase@bmw.de>
14Upstream-Status: Backport [3861e7dc9e83f2f6ff4e1579cf3bbf63a6827105]
15---
16 CMakeLists.txt | 46 +++++++++++++++++++++-------------------------
17 1 file changed, 21 insertions(+), 25 deletions(-)
18
19diff --git a/CMakeLists.txt b/CMakeLists.txt
20index 3b0b87c..41ddf58 100644
21--- a/CMakeLists.txt
22+++ b/CMakeLists.txt
23@@ -1,3 +1,5 @@
24+cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)
25+
26 # Project
27 project(libftdi1 C)
28 set(MAJOR_VERSION 1)
29@@ -12,7 +14,6 @@ if("${CMAKE_BUILD_TYPE}" STREQUAL "")
30 set(CMAKE_BUILD_TYPE RelWithDebInfo)
31 endif("${CMAKE_BUILD_TYPE}" STREQUAL "")
32 set(CMAKE_COLOR_MAKEFILE ON)
33-cmake_minimum_required(VERSION 2.6 FATAL_ERROR)
34
35 add_definitions(-Wall)
36
37@@ -202,30 +203,25 @@ set ( LIBFTDI_VERSION_MINOR ${MINOR_VERSION} )
38
39 set ( LIBFTDI_USE_FILE ${CMAKE_INSTALL_PREFIX}/${LIBFTDI_CMAKE_CONFIG_DIR}/UseLibFTDI1.cmake )
40
41-if(CMAKE_VERSION VERSION_LESS 2.8.8)
42- configure_file ( cmake/LibFTDI1Config.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/LibFTDI1Config.cmake @ONLY )
43- configure_file ( cmake/LibFTDI1ConfigVersion.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/LibFTDI1ConfigVersion.cmake @ONLY )
44-else ()
45- include(CMakePackageConfigHelpers)
46-
47- configure_package_config_file (
48- cmake/LibFTDI1Config.cmake.in
49- ${CMAKE_CURRENT_BINARY_DIR}/LibFTDI1Config.cmake
50- INSTALL_DESTINATION ${LIBFTDI_CMAKE_CONFIG_DIR}
51- PATH_VARS
52- LIBFTDI_USE_FILE
53- LIBFTDI_ROOT_DIR
54- LIBFTDI_INCLUDE_DIR
55- LIBFTDI_INCLUDE_DIRS
56- LIBFTDI_LIBRARY_DIRS
57- NO_CHECK_REQUIRED_COMPONENTS_MACRO
58- )
59- write_basic_package_version_file (
60- LibFTDI1ConfigVersion.cmake
61- VERSION ${LIBFTDI_VERSION_STRING}
62- COMPATIBILITY AnyNewerVersion
63- )
64-endif ()
65+include(CMakePackageConfigHelpers)
66+
67+configure_package_config_file (
68+ cmake/LibFTDI1Config.cmake.in
69+ ${CMAKE_CURRENT_BINARY_DIR}/LibFTDI1Config.cmake
70+ INSTALL_DESTINATION ${LIBFTDI_CMAKE_CONFIG_DIR}
71+ PATH_VARS
72+ LIBFTDI_USE_FILE
73+ LIBFTDI_ROOT_DIR
74+ LIBFTDI_INCLUDE_DIR
75+ LIBFTDI_INCLUDE_DIRS
76+ LIBFTDI_LIBRARY_DIRS
77+ NO_CHECK_REQUIRED_COMPONENTS_MACRO
78+)
79+write_basic_package_version_file (
80+ LibFTDI1ConfigVersion.cmake
81+ VERSION ${LIBFTDI_VERSION_STRING}
82+ COMPATIBILITY AnyNewerVersion
83+)
84
85
86 install ( FILES
diff --git a/meta-oe/recipes-support/libftdi/files/0002-CMake-require-2.8.12-for-cmake_example.patch b/meta-oe/recipes-support/libftdi/files/0002-CMake-require-2.8.12-for-cmake_example.patch
new file mode 100644
index 0000000000..a31a67df88
--- /dev/null
+++ b/meta-oe/recipes-support/libftdi/files/0002-CMake-require-2.8.12-for-cmake_example.patch
@@ -0,0 +1,24 @@
1From 579c08ec00d7cfd72071a86c67fb3b3c5fec5a9e Mon Sep 17 00:00:00 2001
2From: Yegor Yefremov <yegorslists@googlemail.com>
3Date: Thu, 31 Aug 2023 09:23:29 +0200
4Subject: [PATCH] CMake: require 2.8.12 for cmake_example
5
6Make CMake minimal version requirement consistent for the entire
7project.
8
9Signed-off-by: Moritz Haase <Moritz.Haase@bmw.de>
10Upstream-Status: Backport [61a6bac98bbac623fb33b6153a063b6436f84721]
11---
12 examples/cmake_example/CMakeLists.txt | 2 +-
13 1 file changed, 1 insertion(+), 1 deletion(-)
14
15diff --git a/examples/cmake_example/CMakeLists.txt b/examples/cmake_example/CMakeLists.txt
16index fe203ed..264752d 100644
17--- a/examples/cmake_example/CMakeLists.txt
18+++ b/examples/cmake_example/CMakeLists.txt
19@@ -1,4 +1,4 @@
20-cmake_minimum_required ( VERSION 2.8 )
21+cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)
22
23 project ( example C )
24
diff --git a/meta-oe/recipes-support/libftdi/files/0003-CMake-bump-the-minimal-required-version-to-3.5.patch b/meta-oe/recipes-support/libftdi/files/0003-CMake-bump-the-minimal-required-version-to-3.5.patch
new file mode 100644
index 0000000000..b541cb69f4
--- /dev/null
+++ b/meta-oe/recipes-support/libftdi/files/0003-CMake-bump-the-minimal-required-version-to-3.5.patch
@@ -0,0 +1,34 @@
1From e6d18a015907b22345bf8994110f68f0609949a9 Mon Sep 17 00:00:00 2001
2From: Yegor Yefremov <yegorslists@googlemail.com>
3Date: Tue, 12 Dec 2023 14:20:36 +0100
4Subject: [PATCH] CMake: bump the minimal required version to 3.5
5
6Older CMake versions are treated as deprecated.
7
8Signed-off-by: Moritz Haase <Moritz.Haase@bmw.de>
9Upstream-Status: Backport [de9f01ece34d2fe6e842e0250a38f4b16eda2429]
10---
11 CMakeLists.txt | 2 +-
12 examples/cmake_example/CMakeLists.txt | 2 +-
13 2 files changed, 2 insertions(+), 2 deletions(-)
14
15diff --git a/CMakeLists.txt b/CMakeLists.txt
16index 41ddf58..c37887b 100644
17--- a/CMakeLists.txt
18+++ b/CMakeLists.txt
19@@ -1,4 +1,4 @@
20-cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)
21+cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
22
23 # Project
24 project(libftdi1 C)
25diff --git a/examples/cmake_example/CMakeLists.txt b/examples/cmake_example/CMakeLists.txt
26index 264752d..cbdd2e4 100644
27--- a/examples/cmake_example/CMakeLists.txt
28+++ b/examples/cmake_example/CMakeLists.txt
29@@ -1,4 +1,4 @@
30-cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)
31+cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
32
33 project ( example C )
34
diff --git a/meta-oe/recipes-support/libftdi/libftdi_1.5.bb b/meta-oe/recipes-support/libftdi/libftdi_1.5.bb
index 8c30eca0e7..6faab82ad5 100644
--- a/meta-oe/recipes-support/libftdi/libftdi_1.5.bb
+++ b/meta-oe/recipes-support/libftdi/libftdi_1.5.bb
@@ -14,6 +14,9 @@ DEPENDS = "libusb1 python3 swig-native"
14SRC_URI = "\ 14SRC_URI = "\
15 http://www.intra2net.com/en/developer/${BPN}/download/${BPN}1-${PV}.tar.bz2 \ 15 http://www.intra2net.com/en/developer/${BPN}/download/${BPN}1-${PV}.tar.bz2 \
16 file://CMakeLists-txt-fix-paths-when-FTDIPP-is-set.patch \ 16 file://CMakeLists-txt-fix-paths-when-FTDIPP-is-set.patch \
17 file://0001-CMake-bump-the-minimal-required-version-to-2.8.12.patch \
18 file://0002-CMake-require-2.8.12-for-cmake_example.patch \
19 file://0003-CMake-bump-the-minimal-required-version-to-3.5.patch \
17" 20"
18SRC_URI[sha256sum] = "7c7091e9c86196148bd41177b4590dccb1510bfe6cea5bf7407ff194482eb049" 21SRC_URI[sha256sum] = "7c7091e9c86196148bd41177b4590dccb1510bfe6cea5bf7407ff194482eb049"
19 22