File fix-qdbusxml2cpp-path.patch of Package deepin-session-shell
diff -Nur dde-session-shell-snipe-6.0.37/CMakeLists.txt dde-session-shell-snipe-6.0.37-new/CMakeLists.txt
--- dde-session-shell-snipe-6.0.37/CMakeLists.txt 2025-05-13 20:00:47.000000000 +0800
+++ dde-session-shell-snipe-6.0.37-new/CMakeLists.txt 2025-05-15 21:21:49.964867205 +0800
@@ -134,9 +134,21 @@
endif()
function(generation_dbus_interface xml class_name class_file option)
- execute_process(COMMAND /usr/lib/qt${QT_VERSION_MAJOR}/bin/qdbusxml2cpp ${option} -p ${class_file} -c ${class_name} ${xml}
- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
-endfunction(generation_dbus_interface)
+ set(QT_QDBUSXML2CPP "/usr/lib/qt${QT_VERSION_MAJOR}/bin/qdbusxml2cpp")
+
+ if(NOT EXISTS "${QT_QDBUSXML2CPP}")
+ set(QT_QDBUSXML2CPP "/usr/lib64/qt${QT_VERSION_MAJOR}/bin/qdbusxml2cpp")
+ endif()
+
+ if(NOT EXISTS "${QT_QDBUSXML2CPP}")
+ message(FATAL_ERROR "qdbusxml2cpp not found in /usr/lib or /usr/lib64 for Qt${QT_VERSION_MAJOR}")
+ endif()
+
+ execute_process(
+ COMMAND ${QT_QDBUSXML2CPP} ${option} -p ${class_file} -c ${class_name} ${xml}
+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+ )
+endfunction()
set (SWITCH_OS_XML "${CMAKE_SOURCE_DIR}/xml/com.huawei.switchos.xml")
if (DISABLE_DSS_SNIPE)