diff options
author | magicWenli <48174882+magicwenli@users.noreply.github.com> | 2024-04-11 17:23:14 +0800 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2024-04-30 11:17:47 -0700 |
commit | 224eb2697ffddc97a2ff0a4ee3dbca14ec3bb13e (patch) | |
tree | 0433c981aa0da0616f3cbc4ff01c36be8db9dd35 /meta-oe/recipes-support | |
parent | 01d3dca6e991e7da7ea9f181a75536a430e1bece (diff) | |
download | meta-openembedded-224eb2697ffddc97a2ff0a4ee3dbca14ec3bb13e.tar.gz |
serial: Fix empty package and use shared lib instead of static lib.
see also: https://docs.yoctoproject.org/pipermail/yocto/2015-January/022921.html
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-support')
-rw-r--r-- | meta-oe/recipes-support/serial/serial/0001-Add-SOVERSION-for-shared-lib-and-comment-example.patch | 46 | ||||
-rw-r--r-- | meta-oe/recipes-support/serial/serial_1.2.1.bb | 1 |
2 files changed, 47 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/serial/serial/0001-Add-SOVERSION-for-shared-lib-and-comment-example.patch b/meta-oe/recipes-support/serial/serial/0001-Add-SOVERSION-for-shared-lib-and-comment-example.patch new file mode 100644 index 000000000..5f4a81a72 --- /dev/null +++ b/meta-oe/recipes-support/serial/serial/0001-Add-SOVERSION-for-shared-lib-and-comment-example.patch | |||
@@ -0,0 +1,46 @@ | |||
1 | From 23ae981ba46f6d5af03b12083ad32de9c1f148b2 Mon Sep 17 00:00:00 2001 | ||
2 | From: magicWenli <48174882+magicwenli@users.noreply.github.com> | ||
3 | Date: Fri, 12 Apr 2024 07:52:53 +0000 | ||
4 | Subject: [PATCH] Add SOVERSION for shared lib, and comment example by default | ||
5 | |||
6 | Upstream-Status: Pending | ||
7 | --- | ||
8 | CMakeLists.txt | 14 ++++++++++---- | ||
9 | 1 file changed, 10 insertions(+), 4 deletions(-) | ||
10 | |||
11 | --- a/CMakeLists.txt | ||
12 | +++ b/CMakeLists.txt | ||
13 | @@ -1,5 +1,8 @@ | ||
14 | cmake_minimum_required(VERSION 2.8.3) | ||
15 | project(serial) | ||
16 | +set (SERIAL_VERSION_MAJOR 1) | ||
17 | +set (SERIAL_VERSION_MINOR 2) | ||
18 | +set (SERIAL_VERSION_PATCH 1) | ||
19 | |||
20 | # Find catkin | ||
21 | find_package(catkin REQUIRED) | ||
22 | @@ -45,7 +48,7 @@ else() | ||
23 | endif() | ||
24 | |||
25 | ## Add serial library | ||
26 | -add_library(${PROJECT_NAME} ${serial_SRCS}) | ||
27 | +add_library(${PROJECT_NAME} SHARED ${serial_SRCS}) | ||
28 | if(APPLE) | ||
29 | target_link_libraries(${PROJECT_NAME} ${FOUNDATION_LIBRARY} ${IOKIT_LIBRARY}) | ||
30 | elseif(UNIX) | ||
31 | @@ -55,9 +58,12 @@ else() | ||
32 | endif() | ||
33 | |||
34 | ## Uncomment for example | ||
35 | -add_executable(serial_example examples/serial_example.cc) | ||
36 | -add_dependencies(serial_example ${PROJECT_NAME}) | ||
37 | -target_link_libraries(serial_example ${PROJECT_NAME}) | ||
38 | +# add_executable(serial_example examples/serial_example.cc) | ||
39 | +# add_dependencies(serial_example ${PROJECT_NAME}) | ||
40 | +# target_link_libraries(serial_example ${PROJECT_NAME}) | ||
41 | + | ||
42 | +set (SERIAL_VERSION_STRING ${SERIAL_VERSION_MAJOR}.${SERIAL_VERSION_MINOR}.${SERIAL_VERSION_PATCH}) | ||
43 | +set_target_properties (${PROJECT_NAME} PROPERTIES VERSION ${SERIAL_VERSION_STRING} SOVERSION ${SERIAL_VERSION_MAJOR}) | ||
44 | |||
45 | ## Include headers | ||
46 | include_directories(include) | ||
diff --git a/meta-oe/recipes-support/serial/serial_1.2.1.bb b/meta-oe/recipes-support/serial/serial_1.2.1.bb index 8c1fb063b..f42d0f351 100644 --- a/meta-oe/recipes-support/serial/serial_1.2.1.bb +++ b/meta-oe/recipes-support/serial/serial_1.2.1.bb | |||
@@ -6,6 +6,7 @@ LIC_FILES_CHKSUM = "file://README.md;beginline=53;endline=62;md5=049c68d559533f9 | |||
6 | SRC_URI = " \ | 6 | SRC_URI = " \ |
7 | git://github.com/wjwwood/${BPN}.git;protocol=https;branch=main \ | 7 | git://github.com/wjwwood/${BPN}.git;protocol=https;branch=main \ |
8 | file://Findcatkin.cmake \ | 8 | file://Findcatkin.cmake \ |
9 | file://0001-Add-SOVERSION-for-shared-lib-and-comment-example.patch \ | ||
9 | " | 10 | " |
10 | SRCREV = "10ac4e1c25c2cda1dc0a32a8e12b87fd89f3bb4f" | 11 | SRCREV = "10ac4e1c25c2cda1dc0a32a8e12b87fd89f3bb4f" |
11 | SRC_URI[sha256sum] = "c8cd235dda2ef7d977ba06dfcb35c35e42f45cfd9149ba3ad257756123d8ff96" | 12 | SRC_URI[sha256sum] = "c8cd235dda2ef7d977ba06dfcb35c35e42f45cfd9149ba3ad257756123d8ff96" |