avro: extend avro-c++ to native and nativesdk

- fix HOMEPAGE for both avro recipes
- fix cmake install paths in patch
This commit is contained in:
Rui Costa 2024-04-15 12:33:34 +01:00 committed by Khem Raj
parent ad340c8fe2
commit c4107ba77e
No known key found for this signature in database
GPG Key ID: BB053355919D3314
5 changed files with 35 additions and 32 deletions

View File

@ -1,9 +1,10 @@
From 6be1c45e1f7ee78499bdca76c25ec23a61317134 Mon Sep 17 00:00:00 2001
From: Rui Costa <rui.ms.costa@ctw.bmwgroup.com>
Date: Wed, 20 Mar 2024 14:58:27 +0000
Subject: [PATCH 1/2] Remove cpp unittest compilation
Subject: [PATCH] Remove cpp unittest compilation
Upstream-Status: Inappropriate [oe-specific]
---
lang/c++/CMakeLists.txt | 61 -----------------------------------------
1 file changed, 61 deletions(-)
@ -83,6 +84,3 @@ index 4a3793152..d94ba42d3 100644
include (InstallRequiredSystemLibraries)
set (CPACK_PACKAGE_FILE_NAME "avrocpp-${AVRO_VERSION_MAJOR}")
--
2.44.0

View File

@ -1,39 +1,47 @@
From 56feaa90d070a5011f380d3ae47c01643b9fafe0 Mon Sep 17 00:00:00 2001
From 86aa3f2333a9b8e6f1c631e6d5cb7296b6e8380b Mon Sep 17 00:00:00 2001
From: Rui Costa <rui.ms.costa@ctw.bmwgroup.com>
Date: Fri, 22 Mar 2024 13:27:38 +0000
Subject: [PATCH 2/2] Add package configuration files
Subject: [PATCH] Add package configuration files
Upstream-Status: Pending
---
lang/c++/CMakeLists.txt | 35 +++++++++++++++++++++++++++---
lang/c++/cmake/AvroCppConfig.cmake | 5 +++++
2 files changed, 37 insertions(+), 3 deletions(-)
lang/c++/CMakeLists.txt | 45 ++++++++++++++++++++++++------
lang/c++/cmake/AvroCppConfig.cmake | 5 ++++
2 files changed, 42 insertions(+), 8 deletions(-)
create mode 100644 lang/c++/cmake/AvroCppConfig.cmake
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d94ba42d3..2e5a394cb 100644
index d94ba42d3..4748b111d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -140,12 +140,16 @@ set (CPACK_PACKAGE_FILE_NAME "avrocpp-${AVRO_VERSION_MAJOR}")
@@ -140,14 +140,18 @@ set (CPACK_PACKAGE_FILE_NAME "avrocpp-${AVRO_VERSION_MAJOR}")
include (CPack)
-install (TARGETS avrocpp avrocpp_s
- LIBRARY DESTINATION lib
- ARCHIVE DESTINATION lib
- RUNTIME DESTINATION lib)
-
-install (TARGETS avrogencpp RUNTIME DESTINATION bin)
-
-install (DIRECTORY api/ DESTINATION include/avro
+install (TARGETS avrocpp
+ EXPORT AvroCppTargets
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
- RUNTIME DESTINATION lib)
+ RUNTIME DESTINATION lib
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ INCLUDES DESTINATION include)
-install (TARGETS avrogencpp RUNTIME DESTINATION bin)
+
+install (TARGETS avrogencpp
+ EXPORT AvroCppTargets
+ RUNTIME DESTINATION bin)
install (DIRECTORY api/ DESTINATION include/avro
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
+
+install (DIRECTORY api/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/avro
FILES_MATCHING PATTERN *.hh)
if (NOT CMAKE_BUILD_TYPE)
@@ -155,3 +159,28 @@ if (NOT CMAKE_BUILD_TYPE)
"Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel."
FORCE)
@ -52,7 +60,7 @@ index d94ba42d3..2e5a394cb 100644
+ COPYONLY
+)
+
+set(ConfigPackageLocation lib/cmake/avrocpp)
+set(ConfigPackageLocation ${CMAKE_INSTALL_LIBDIR}/cmake/avrocpp)
+install(EXPORT AvroCppTargets
+ FILE AvroCppTargets.cmake
+ NAMESPACE AvroCpp::
@ -74,6 +82,3 @@ index 000000000..deb8aaa31
+ COMPONENTS filesystem iostreams program_options regex system)
+
+include("${CMAKE_CURRENT_LIST_DIR}/AvroCppTargets.cmake")
--
2.44.0

View File

@ -1,15 +1,16 @@
From 640c51c61536913b3d43714bebe228b32f043144 Mon Sep 17 00:00:00 2001
From 66c08ade24e4472b5af5dca48097ed9a2ec035ec Mon Sep 17 00:00:00 2001
From: Rui Costa <rui.ms.costa@ctw.bmwgroup.com>
Date: Fri, 5 Apr 2024 11:33:51 +0000
Subject: [PATCH 3/3] Update CXX standard to CXX14
Subject: [PATCH] Update CXX standard to CXX14
Upstream-Status: Inappropriate [oe-specific]
---
lang/c++/CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2e5a394cb..f29a532ef 100644
index 4748b111d..1e45c13d5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -21,7 +21,7 @@ cmake_minimum_required (VERSION 3.1)
@ -21,6 +22,3 @@ index 2e5a394cb..f29a532ef 100644
endif()
set(CMAKE_CXX_STANDARD_REQUIRED ON)
--
2.44.0

View File

@ -1,5 +1,5 @@
SUMMARY = "Apache Avro data serialization system."
HOMEPAGE = "http://apr.apache.org/"
HOMEPAGE = "https://avro.apache.org/"
SECTION = "libs"
LICENSE = "Apache-2.0"
@ -18,3 +18,5 @@ SRC_URI = "git://github.com/apache/avro;branch=${BRANCH};protocol=https \
S = "${WORKDIR}/git/lang/c++"
inherit cmake pkgconfig
BBCLASSEXTEND = "native nativesdk"

View File

@ -1,5 +1,5 @@
SUMMARY = "Apache Avro data serialization system."
HOMEPAGE = "http://apr.apache.org/"
HOMEPAGE = "https://avro.apache.org/"
SECTION = "libs"
LICENSE = "Apache-2.0"