Skip to content

Commit 0ad1660

Browse files
author
Anthony Mallet
committed
[path/py-hpp-manipulation-corba] Ref. full path of libs in exported targets
* patch-aa: use the pkg-config <prefix>_LINK_LIBRARIES as an argument to target_link_libraries() instead of fiddling with <prefix>_LDFLAGS. This way, the exported cmake targets contain the full path to dependendant libraries instead of -L/-l flags. For some reason, the -L flags in INTERFACE_LINK_LIBRARIES is swallowed by cmake when the imported target is used. This is also more robust wrt. the linker flags ordering. This is an attempt to address issue #431 and linking with robotpkg omniORB when a system omniORB is also present. Bump PKGREVISION.
1 parent 3217528 commit 0ad1660

File tree

3 files changed

+43
-0
lines changed

3 files changed

+43
-0
lines changed

path/py-hpp-manipulation-corba/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# Created: Florent Lamiraux on Sat, 7 Mar 2015
33
#
44

5+
PKGREVISION= 1
56
HPP_PACKAGE= hpp-manipulation-corba
67
HPP_COMMENT= CORBA interface for hpp-manipulation
78

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
SHA1 (hpp-manipulation-corba-5.2.0.tar.gz) = e11c54f863ed414e0b7b6fe38136b82d56820b43
22
RMD160 (hpp-manipulation-corba-5.2.0.tar.gz) = 93de3e46d58e52e0061fc58fffb3efede621e2ff
33
Size (hpp-manipulation-corba-5.2.0.tar.gz) = 916671 bytes
4+
SHA1 (patch-aa) = 8178b68b4c135e375368b21c72c4a38d8f99bd05
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
Replace LINK_FLAG target property set from <prefix>_LDFLAGS by a proper
2+
target_link_libraries() using <prefix>_LINK_LIBRARIES for pkg-config
3+
dependencies. Otherwise, the full path of the linked library may not be
4+
preserved (-L linker flag in INTERFACE_LINK_LIBRARIES mysteriously disappear when
5+
using imported targets). Using LDFLAGS is also depend on the linker path order,
6+
so this is not robust anyway.
7+
8+
Still append <prefix>_LDFLAGS_OTHER to LINK_FLAGS, as this may contain e.g. a
9+
required linker rpath.
10+
11+
--- cmake/pkg-config.cmake~ 2024-10-08 00:19:41.000000000 +0200
12+
+++ cmake/pkg-config.cmake 2024-11-08 17:14:01.580195312 +0100
13+
@@ -992,13 +992,12 @@
14+
endif()
15+
16+
# Transform semi-colon seperated list in to space separated list.
17+
- foreach(FLAG ${${PREFIX}_LDFLAGS})
18+
+ foreach(FLAG ${${PREFIX}_LDFLAGS_OTHER})
19+
set(LDFLAGS "${LDFLAGS} ${FLAG}")
20+
endforeach()
21+
22+
# Update the flags.
23+
set_target_properties(${TARGET} PROPERTIES LINK_FLAGS${CONFIG} "${LDFLAGS}")
24+
- _filter_link_flags(${TARGET} ${IS_GENERAL} ${IS_DEBUG} "${${PREFIX}_LDFLAGS}")
25+
_filter_link_flags(${TARGET} ${IS_GENERAL} ${IS_DEBUG}
26+
"${${PREFIX}_LDFLAGS_OTHER}")
27+
endmacro(
28+
@@ -1046,12 +1046,7 @@
29+
endif()
30+
endif()
31+
32+
- # Include/libraries paths seems to be filtered on Linux, add paths again.
33+
- link_directories(${${PREFIX}_LIBRARY_DIRS})
34+
- if(DEFINED ${PREFIX}_DEBUG_FOUND)
35+
- link_directories(${${PREFIX}_DEBUG_LIBRARY_DIRS})
36+
- endif()
37+
-
38+
+ target_link_libraries(${TARGET} ${PUBLIC_KEYWORD} ${${PREFIX}_LINK_LIBRARIES})
39+
endmacro(PKG_CONFIG_USE_LLINK_DEPENDENCY)
40+
41+
macro(BUILD_PREFIX_FOR_PKG DEPENDENCY PREFIX)

0 commit comments

Comments
 (0)