forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-02-13 e440ec23c5a540cdd3f7464e8779219be6fd3d95
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
From b8dc608dad7d9fc3a4c16acd0327d97b81c23b95 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Tue, 15 Nov 2016 01:32:31 +0000
Subject: [PATCH] apps/CMakeLists.txt: Explicitly link libbfb and libmulticobex
 
Transitive linking is disabled now for multicobex and
obexftp, This ends up with linking errors for apps, therefore
they are required to be added to link line explicitly.
 
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 apps/CMakeLists.txt | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)
 
Index: obexftp-0.24.2-Source/apps/CMakeLists.txt
===================================================================
--- obexftp-0.24.2-Source.orig/apps/CMakeLists.txt
+++ obexftp-0.24.2-Source/apps/CMakeLists.txt
@@ -5,14 +5,23 @@ add_definitions( -DVERSION="${obexftp_VE
 add_definitions ( -DHAVE_USB )
 
 add_executable ( obexftp_app obexftp.c )
-target_link_libraries ( obexftp_app obexftp )
+target_link_libraries ( obexftp_app
+  PRIVATE multicobex
+  PRIVATE bfb
+  obexftp
+)
 set_target_properties ( obexftp_app PROPERTIES
   OUTPUT_NAME obexftp
 )
 
 
 add_executable ( obexftpd_app obexftpd.c )
-target_link_libraries ( obexftpd_app obexftp openobex )
+target_link_libraries ( obexftpd_app
+  PRIVATE multicobex
+  PRIVATE bfb
+  obexftp
+  openobex
+)
 set_target_properties ( obexftpd_app PROPERTIES
   OUTPUT_NAME obexftpd
 )
Index: obexftp-0.24.2-Source/fuse/CMakeLists.txt
===================================================================
--- obexftp-0.24.2-Source.orig/fuse/CMakeLists.txt
+++ obexftp-0.24.2-Source/fuse/CMakeLists.txt
@@ -13,6 +13,8 @@ if ( Fuse_FOUND )
   )
 
   target_link_libraries ( obexfs
+    PRIVATE multicobex
+    PRIVATE bfb
     obexftp
     ${Fuse_LIBRARIES}
     ${EXPAT_LIBRARIES}
@@ -23,6 +25,8 @@ if ( Fuse_FOUND )
   )
 
   target_link_libraries ( obexautofs
+    PRIVATE multicobex
+    PRIVATE bfb
     obexftp
     ${Fuse_LIBRARIES}
   )