Skip to content

Commit 3c7a3dd

Browse files
committed
{humble} qt-gui-cpp: Use CMake for tinyxml2
Signed-off-by: Rob Woolley <[email protected]>
1 parent cca2e89 commit 3c7a3dd

File tree

2 files changed

+33
-1
lines changed

2 files changed

+33
-1
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
This uses the CMake config variables for libraries instead of the generator.
2+
3+
The generator approach was resulting in TARGET_FILE:tinyxml2::tinyxml2 appearing
4+
directly in the generated pyproject.toml and libqt_gui_cpp_sip.pro files.
5+
6+
Commenting out this line avoids TinyXML2_LIBRARIES being fed into a loop that
7+
adds TARGET_FILE:tinyxml2::tinyxml2. The tinyxml2 library path is already present
8+
in deps_libraries.
9+
10+
Eventually, pip install was invoked which called QMake then Make. The linker
11+
did not like it and would fail.
12+
13+
This resulted in pip reporting "error: subprocess-exited-with-error"
14+
15+
Signed-off-by: Rob Woolley <[email protected]>
16+
17+
Upstream-Status: Pending
18+
19+
Index: git/src/qt_gui_cpp_sip/CMakeLists.txt
20+
===================================================================
21+
--- git.orig/src/qt_gui_cpp_sip/CMakeLists.txt
22+
+++ git/src/qt_gui_cpp_sip/CMakeLists.txt
23+
@@ -33,7 +33,7 @@ set(qt_gui_cpp_sip_LDFLAGS_OTHER ${qt_gu
24+
25+
ament_get_recursive_properties(deps_include_dirs deps_libraries ${pluginlib_TARGETS})
26+
list(APPEND deps_include_dirs ${TinyXML2_INCLUDE_DIRS})
27+
-list(APPEND deps_libraries ${TinyXML2_LIBRARIES})
28+
+# list(APPEND deps_libraries ${TinyXML2_LIBRARIES})
29+
30+
find_package(Python3 REQUIRED COMPONENTS Development)
31+

meta-ros2-humble/recipes-bbappends/qt-gui-core/qt-gui-cpp_2.2.4-1.bbappend

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ DEPENDS += "python3-pip-native"
1212
export SIP_PROJECT_INCLUDE_DIRS = "${STAGING_DIR_TARGET}/${libdir}/${PYTHON_DIR}/site-packages/PyQt5/bindings"
1313

1414
FILESEXTRAPATHS:prepend := "${THISDIR}/${BPN}:"
15-
SRC_URI += "file://use-cmake-target-libraries.patch"
15+
SRC_URI += "file://use-cmake-target-libraries.patch \
16+
file://use-cmake-target-libraries-for-tinyxml2.patch"
1617

1718
# This is needed to set OE_QMAKE_PATH_EXTERNAL_HOST_BINS to resolve:
1819
# | -- Found PythonLibs: ros2-foxy-dunfell/tmp-glibc/work/core2-64-oe-linux/qt-gui-cpp/1.0.8-1-r0/recipe-sysroot/usr/lib/libpython3.8.so (found suitable version "3.8.2", minimum required is "3.8")

0 commit comments

Comments
 (0)