mirror of
git://git.openembedded.org/meta-openembedded
synced 2025-12-31 13:38:06 +00:00
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>
This commit is contained in:
parent
5ffd6f7cb7
commit
db04122a40
@ -0,0 +1,86 @@
|
||||
From 9b1419d46b156c3c61d30e761ee3636431187cc0 Mon Sep 17 00:00:00 2001
|
||||
From: Yegor Yefremov <yegorslists@googlemail.com>
|
||||
Date: Tue, 1 Aug 2023 11:53:35 +0200
|
||||
Subject: [PATCH] CMake: bump the minimal required version to 2.8.12
|
||||
|
||||
The older CMake versions are deprecated.
|
||||
|
||||
Remove support for CMake code compatible with CMake older than 2.8.8.
|
||||
|
||||
Also move cmake_minimum_required() command before the project()
|
||||
command invocation.
|
||||
|
||||
Signed-off-by: Moritz Haase <Moritz.Haase@bmw.de>
|
||||
Upstream-Status: Backport [3861e7dc9e83f2f6ff4e1579cf3bbf63a6827105]
|
||||
---
|
||||
CMakeLists.txt | 46 +++++++++++++++++++++-------------------------
|
||||
1 file changed, 21 insertions(+), 25 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 3b0b87c..41ddf58 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -1,3 +1,5 @@
|
||||
+cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)
|
||||
+
|
||||
# Project
|
||||
project(libftdi1 C)
|
||||
set(MAJOR_VERSION 1)
|
||||
@@ -12,7 +14,6 @@ if("${CMAKE_BUILD_TYPE}" STREQUAL "")
|
||||
set(CMAKE_BUILD_TYPE RelWithDebInfo)
|
||||
endif("${CMAKE_BUILD_TYPE}" STREQUAL "")
|
||||
set(CMAKE_COLOR_MAKEFILE ON)
|
||||
-cmake_minimum_required(VERSION 2.6 FATAL_ERROR)
|
||||
|
||||
add_definitions(-Wall)
|
||||
|
||||
@@ -202,30 +203,25 @@ set ( LIBFTDI_VERSION_MINOR ${MINOR_VERSION} )
|
||||
|
||||
set ( LIBFTDI_USE_FILE ${CMAKE_INSTALL_PREFIX}/${LIBFTDI_CMAKE_CONFIG_DIR}/UseLibFTDI1.cmake )
|
||||
|
||||
-if(CMAKE_VERSION VERSION_LESS 2.8.8)
|
||||
- configure_file ( cmake/LibFTDI1Config.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/LibFTDI1Config.cmake @ONLY )
|
||||
- configure_file ( cmake/LibFTDI1ConfigVersion.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/LibFTDI1ConfigVersion.cmake @ONLY )
|
||||
-else ()
|
||||
- include(CMakePackageConfigHelpers)
|
||||
-
|
||||
- configure_package_config_file (
|
||||
- cmake/LibFTDI1Config.cmake.in
|
||||
- ${CMAKE_CURRENT_BINARY_DIR}/LibFTDI1Config.cmake
|
||||
- INSTALL_DESTINATION ${LIBFTDI_CMAKE_CONFIG_DIR}
|
||||
- PATH_VARS
|
||||
- LIBFTDI_USE_FILE
|
||||
- LIBFTDI_ROOT_DIR
|
||||
- LIBFTDI_INCLUDE_DIR
|
||||
- LIBFTDI_INCLUDE_DIRS
|
||||
- LIBFTDI_LIBRARY_DIRS
|
||||
- NO_CHECK_REQUIRED_COMPONENTS_MACRO
|
||||
- )
|
||||
- write_basic_package_version_file (
|
||||
- LibFTDI1ConfigVersion.cmake
|
||||
- VERSION ${LIBFTDI_VERSION_STRING}
|
||||
- COMPATIBILITY AnyNewerVersion
|
||||
- )
|
||||
-endif ()
|
||||
+include(CMakePackageConfigHelpers)
|
||||
+
|
||||
+configure_package_config_file (
|
||||
+ cmake/LibFTDI1Config.cmake.in
|
||||
+ ${CMAKE_CURRENT_BINARY_DIR}/LibFTDI1Config.cmake
|
||||
+ INSTALL_DESTINATION ${LIBFTDI_CMAKE_CONFIG_DIR}
|
||||
+ PATH_VARS
|
||||
+ LIBFTDI_USE_FILE
|
||||
+ LIBFTDI_ROOT_DIR
|
||||
+ LIBFTDI_INCLUDE_DIR
|
||||
+ LIBFTDI_INCLUDE_DIRS
|
||||
+ LIBFTDI_LIBRARY_DIRS
|
||||
+ NO_CHECK_REQUIRED_COMPONENTS_MACRO
|
||||
+)
|
||||
+write_basic_package_version_file (
|
||||
+ LibFTDI1ConfigVersion.cmake
|
||||
+ VERSION ${LIBFTDI_VERSION_STRING}
|
||||
+ COMPATIBILITY AnyNewerVersion
|
||||
+)
|
||||
|
||||
|
||||
install ( FILES
|
||||
@ -0,0 +1,24 @@
|
||||
From 579c08ec00d7cfd72071a86c67fb3b3c5fec5a9e Mon Sep 17 00:00:00 2001
|
||||
From: Yegor Yefremov <yegorslists@googlemail.com>
|
||||
Date: Thu, 31 Aug 2023 09:23:29 +0200
|
||||
Subject: [PATCH] CMake: require 2.8.12 for cmake_example
|
||||
|
||||
Make CMake minimal version requirement consistent for the entire
|
||||
project.
|
||||
|
||||
Signed-off-by: Moritz Haase <Moritz.Haase@bmw.de>
|
||||
Upstream-Status: Backport [61a6bac98bbac623fb33b6153a063b6436f84721]
|
||||
---
|
||||
examples/cmake_example/CMakeLists.txt | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/examples/cmake_example/CMakeLists.txt b/examples/cmake_example/CMakeLists.txt
|
||||
index fe203ed..264752d 100644
|
||||
--- a/examples/cmake_example/CMakeLists.txt
|
||||
+++ b/examples/cmake_example/CMakeLists.txt
|
||||
@@ -1,4 +1,4 @@
|
||||
-cmake_minimum_required ( VERSION 2.8 )
|
||||
+cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)
|
||||
|
||||
project ( example C )
|
||||
|
||||
@ -0,0 +1,34 @@
|
||||
From e6d18a015907b22345bf8994110f68f0609949a9 Mon Sep 17 00:00:00 2001
|
||||
From: Yegor Yefremov <yegorslists@googlemail.com>
|
||||
Date: Tue, 12 Dec 2023 14:20:36 +0100
|
||||
Subject: [PATCH] CMake: bump the minimal required version to 3.5
|
||||
|
||||
Older CMake versions are treated as deprecated.
|
||||
|
||||
Signed-off-by: Moritz Haase <Moritz.Haase@bmw.de>
|
||||
Upstream-Status: Backport [de9f01ece34d2fe6e842e0250a38f4b16eda2429]
|
||||
---
|
||||
CMakeLists.txt | 2 +-
|
||||
examples/cmake_example/CMakeLists.txt | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 41ddf58..c37887b 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -1,4 +1,4 @@
|
||||
-cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)
|
||||
+cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
|
||||
|
||||
# Project
|
||||
project(libftdi1 C)
|
||||
diff --git a/examples/cmake_example/CMakeLists.txt b/examples/cmake_example/CMakeLists.txt
|
||||
index 264752d..cbdd2e4 100644
|
||||
--- a/examples/cmake_example/CMakeLists.txt
|
||||
+++ b/examples/cmake_example/CMakeLists.txt
|
||||
@@ -1,4 +1,4 @@
|
||||
-cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)
|
||||
+cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
|
||||
|
||||
project ( example C )
|
||||
|
||||
@ -14,6 +14,9 @@ DEPENDS = "libusb1 python3 swig-native"
|
||||
SRC_URI = "\
|
||||
http://www.intra2net.com/en/developer/${BPN}/download/${BPN}1-${PV}.tar.bz2 \
|
||||
file://CMakeLists-txt-fix-paths-when-FTDIPP-is-set.patch \
|
||||
file://0001-CMake-bump-the-minimal-required-version-to-2.8.12.patch \
|
||||
file://0002-CMake-require-2.8.12-for-cmake_example.patch \
|
||||
file://0003-CMake-bump-the-minimal-required-version-to-3.5.patch \
|
||||
"
|
||||
SRC_URI[sha256sum] = "7c7091e9c86196148bd41177b4590dccb1510bfe6cea5bf7407ff194482eb049"
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user