<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Unable to include dependent .so libraries when generating .deb package for Qt application]]></title><description><![CDATA[<p dir="auto">I’m building a Qt C++ application for Linux (Ubuntu), and I want to distribute it as a .deb package.<br />
However, I’m unable to include the required .so dependency files (for example <a href="http://libQt6WebEngineCore.so" target="_blank" rel="noopener noreferrer nofollow ugc">libQt6WebEngineCore.so</a>, <a href="http://libQt6WebView.so" target="_blank" rel="noopener noreferrer nofollow ugc">libQt6WebView.so</a>, etc.) inside the generated .deb installer.</p>
<p dir="auto">When I install the .deb on another system (without Qt installed), the app fails to start due to missing shared libraries.<br />
I wanted to know, How to add required dependency to .deb file ?</p>
<p dir="auto">Environment:</p>
<p dir="auto">Qt Version: 6.10.0<br />
OS: Ubuntu 22.04.5<br />
Build Tool: CMake</p>
]]></description><link>https://forum.qt.io/topic/163703/unable-to-include-dependent-.so-libraries-when-generating-.deb-package-for-qt-application</link><generator>RSS for Node</generator><lastBuildDate>Mon, 13 Apr 2026 03:19:19 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/163703.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 12 Nov 2025 04:24:02 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Unable to include dependent .so libraries when generating .deb package for Qt application on Thu, 13 Nov 2025 03:59:47 GMT]]></title><description><![CDATA[<pre><code>cmake_minimum_required(VERSION 4.0)
project(desk_pos_test)

set(CMAKE_CXX_STANDARD 20)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)


# Tell the binary to look for libraries inside ../lib relative to executable
set(CMAKE_BUILD_RPATH "$ORIGIN/../lib")
set(CMAKE_INSTALL_RPATH "$ORIGIN/../lib")


find_package(Qt6 COMPONENTS
        Core
        Gui
        Widgets
        WebEngineWidgets
        WebEngineCore
        REQUIRED)


qt6_wrap_cpp(MOC_SOURCES main.cpp)
add_executable(desk_pos_test main.cpp
        main.cpp
)
target_link_libraries(desk_pos_test
        Qt::Core
        Qt::Gui
        Qt::Widgets
        Qt::WebEngineWidgets
        Qt::WebEngineCore
)

install(TARGETS desk_pos_test
        RUNTIME DESTINATION bin
)

## ✅ Install Qt libraries (if you ship them)
#install(DIRECTORY ${CMAKE_SOURCE_DIR}/packages/com.medkart.desktopPos/data/lib/
#        DESTINATION lib/desk-pos-app
#)

function(copy_qt_lib libname)
    get_target_property(_qt_lib_location Qt6::${libname} LOCATION)
    install(FILES ${_qt_lib_location}
            DESTINATION lib/desk-pos-app
    )
endfunction()

# Copy only the required modules
copy_qt_lib(Core)
copy_qt_lib(Gui)
copy_qt_lib(Widgets)
copy_qt_lib(WebEngineCore)
copy_qt_lib(WebEngineWidgets)
copy_qt_lib(WebChannel)

# ✅ Install resources to /usr/local/share/desk-pos-app
install(DIRECTORY ${CMAKE_SOURCE_DIR}/packages/com.medkart.desktopPos/data/
        DESTINATION share/desk-pos-app
        FILES_MATCHING PATTERN "*"
        EXCLUDE PATTERN "lib/*"
)

install(FILES ${CMAKE_SOURCE_DIR}/resources/desk-pos-app.desktop
        DESTINATION /usr/share/applications)

install(FILES ${CMAKE_SOURCE_DIR}/resources/desk-pos-app.svg
        DESTINATION /usr/share/pixmaps)
</code></pre>
<p dir="auto">I am packaging my Qt6 application as a .deb using the CMake setup shown above, which installs the executable, resources, and Qt libraries. and run the following command to make the .deb file, from project folder in terminal</p>
<pre><code>rm -rf build
mkdir build &amp;&amp; cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
cpack -G DEB
</code></pre>
<p dir="auto">Is this an appropriate method for distributing a Qt application to other Linux systems?<br />
How can I optimize this CMake configuration for more reliable deployment and easier updates?</p>
]]></description><link>https://forum.qt.io/post/833583</link><guid isPermaLink="true">https://forum.qt.io/post/833583</guid><dc:creator><![CDATA[smit.patel]]></dc:creator><pubDate>Thu, 13 Nov 2025 03:59:47 GMT</pubDate></item><item><title><![CDATA[Reply to Unable to include dependent .so libraries when generating .deb package for Qt application on Wed, 12 Nov 2025 19:55:35 GMT]]></title><description><![CDATA[<p dir="auto">Hi and welcome to devnet,</p>
<p dir="auto">Why not declare that your package depends on Qt 6 ?<br />
That will trigger proper installation of Qt on the target system.</p>
]]></description><link>https://forum.qt.io/post/833566</link><guid isPermaLink="true">https://forum.qt.io/post/833566</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Wed, 12 Nov 2025 19:55:35 GMT</pubDate></item><item><title><![CDATA[Reply to Unable to include dependent .so libraries when generating .deb package for Qt application on Wed, 12 Nov 2025 05:58:36 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/smit.patel">@<bdi>smit.patel</bdi></a> said in <a href="/post/833548">Unable to include dependent .so libraries when generating .deb package for Qt application</a>:</p>
<blockquote>
<p dir="auto">due to missing shared libraries</p>
</blockquote>
<p dir="auto">Which libraries exactly are missing? Were those libs installed by your deb package and if so where exactly?</p>
]]></description><link>https://forum.qt.io/post/833550</link><guid isPermaLink="true">https://forum.qt.io/post/833550</guid><dc:creator><![CDATA[jsulm]]></dc:creator><pubDate>Wed, 12 Nov 2025 05:58:36 GMT</pubDate></item></channel></rss>