<?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[Excess Static Libs when using QMake]]></title><description><![CDATA[<p dir="auto">Folks,<br />
I am using Qt 6.10 and a source build. When I use QMake to generate the make files and the _plugin_import.cpp file I am getting many additional static libraries that I do not need or have added in automatically, such as QSvgIconPlugin.<br />
I can manually edit the generated files to remove them and things work fine, but in the long term I would rather not have to do that. Any idea how to get Qt to not auto add those static plugins?<br />
Thanks<br />
Dale Pennington</p>
]]></description><link>https://forum.qt.io/topic/163840/excess-static-libs-when-using-qmake</link><generator>RSS for Node</generator><lastBuildDate>Thu, 03 Sep 2026 23:09:38 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/163840.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 01 Dec 2025 15:12:22 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Excess Static Libs when using QMake on Tue, 02 Dec 2025 15:18:23 GMT]]></title><description><![CDATA[<p dir="auto">When all is in one directory then automoc can find them. It does not search in subdirectories.</p>
<p dir="auto">For additional sources - see target_sources cmake command</p>
]]></description><link>https://forum.qt.io/post/834236</link><guid isPermaLink="true">https://forum.qt.io/post/834236</guid><dc:creator><![CDATA[Christian Ehrlicher]]></dc:creator><pubDate>Tue, 02 Dec 2025 15:18:23 GMT</pubDate></item><item><title><![CDATA[Reply to Excess Static Libs when using QMake on Tue, 02 Dec 2025 14:42:35 GMT]]></title><description><![CDATA[<p dir="auto">Odd, not needed in flat file system case, but explicity adding it to the sources did in fact get everything to work.</p>
<p dir="auto">As a side, not important question, is there a way to add sources to a target after the initial qt_add_executable ? I ask this for ease of future use for programs with large numbers of source files.</p>
<p dir="auto">Thanks,<br />
Dale Pennington</p>
]]></description><link>https://forum.qt.io/post/834235</link><guid isPermaLink="true">https://forum.qt.io/post/834235</guid><dc:creator><![CDATA[DalePennington]]></dc:creator><pubDate>Tue, 02 Dec 2025 14:42:35 GMT</pubDate></item><item><title><![CDATA[Reply to Excess Static Libs when using QMake on Mon, 01 Dec 2025 21:09:20 GMT]]></title><description><![CDATA[<p dir="auto">Add also your headers. Then automoc will find them and you will see them properly in the IDE.</p>
]]></description><link>https://forum.qt.io/post/834212</link><guid isPermaLink="true">https://forum.qt.io/post/834212</guid><dc:creator><![CDATA[Christian Ehrlicher]]></dc:creator><pubDate>Mon, 01 Dec 2025 21:09:20 GMT</pubDate></item><item><title><![CDATA[Reply to Excess Static Libs when using QMake on Mon, 01 Dec 2025 20:25:02 GMT]]></title><description><![CDATA[<p dir="auto">To make help easier, this is the setup</p>
<ol>
<li>Files are in the following tree</li>
</ol>
<pre><code>    guiclient2 - Has .pro file
        forms - has ui file
        inc - has .hpp files
        src - has .cpp files
</code></pre>
<p dir="auto">The CMakeLists.txt file has</p>
<pre><code>cmake_minimum_required(VERSION 3.16)
project(guiclient LANGUAGES CXX)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

set(CMAKE_AUTOUIC_SEARCH_PATHS "forms")

find_package(Qt5 REQUIRED COMPONENTS Widgets WebSockets)

qt_standard_project_setup()

qt_add_executable(guiclient2
    src/main.cpp
    src/echowindow.cpp
}

target_include_directories(guiclient2 PRIVATE inc)
target_link_libraries(guiclient2 PRIVATE
    Qt::Widgets
    Qt::WebSockets
)
</code></pre>
<p dir="auto">The original cmake call sets up the AutogenInfo.json, so it must be determining what UI and MOC need generating at that time.<br />
As noted, if I do the same files in a flat setup (all in guiclient2) it works fine with the same CMakeLists.txt with the paths modified.</p>
<p dir="auto">I hope this helps figure out what I am doing wrong.<br />
Dale Pennington</p>
]]></description><link>https://forum.qt.io/post/834208</link><guid isPermaLink="true">https://forum.qt.io/post/834208</guid><dc:creator><![CDATA[DalePennington]]></dc:creator><pubDate>Mon, 01 Dec 2025 20:25:02 GMT</pubDate></item><item><title><![CDATA[Reply to Excess Static Libs when using QMake on Mon, 01 Dec 2025 20:07:52 GMT]]></title><description><![CDATA[<p dir="auto">At this point I have not. I tried at one point and noticed the MOC_INCLUDES variable in AutogenInfo.json did not change, do I probably did something wrong. It does include the include directory I set for the target, but this is not where the AUTOUIC places the ui_.h file it generates. I am assuming that this needs to be findable to get AUTOMOC to work properly, but no good idea how to fix that.</p>
]]></description><link>https://forum.qt.io/post/834207</link><guid isPermaLink="true">https://forum.qt.io/post/834207</guid><dc:creator><![CDATA[DalePennington]]></dc:creator><pubDate>Mon, 01 Dec 2025 20:07:52 GMT</pubDate></item><item><title><![CDATA[Reply to Excess Static Libs when using QMake on Mon, 01 Dec 2025 19:52:55 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">Might be a silly question but did you set the <a href="https://cmake.org/cmake/help/latest/prop_tgt/AUTOMOC_INCLUDE_DIRECTORIES.html#prop_tgt:AUTOMOC_INCLUDE_DIRECTORIES" target="_blank" rel="noopener noreferrer nofollow ugc">AUTOMOC_INCLUDE_DIRECTORIES</a> property ?</p>
]]></description><link>https://forum.qt.io/post/834206</link><guid isPermaLink="true">https://forum.qt.io/post/834206</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Mon, 01 Dec 2025 19:52:55 GMT</pubDate></item><item><title><![CDATA[Reply to Excess Static Libs when using QMake on Mon, 01 Dec 2025 19:15:52 GMT]]></title><description><![CDATA[<p dir="auto">Tried it, no change. I am trying the cmake file now to see if I can get that to work. Seems to be OK except AUTOMOC is not generating moc files for our basic code tree (with seperate forms,inc and src dirs). Once set the AUTOUIC search path property the forms generated OK, but so far AUTOMOC is not generating the moc. If I turn the tree flat (i.e. put all the files at the top level) it works so there is something I am missing with regards to getting AUTOMOC to look in the right places<br />
Dale</p>
]]></description><link>https://forum.qt.io/post/834204</link><guid isPermaLink="true">https://forum.qt.io/post/834204</guid><dc:creator><![CDATA[DalePennington]]></dc:creator><pubDate>Mon, 01 Dec 2025 19:15:52 GMT</pubDate></item><item><title><![CDATA[Reply to Excess Static Libs when using QMake on Mon, 01 Dec 2025 16:04:09 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/dalepennington">@<bdi>DalePennington</bdi></a> said in <a href="/post/834193">Excess Static Libs when using QMake</a>:</p>
<blockquote></blockquote>
<p dir="auto">Did you try</p>
<pre><code>QT -= svg
</code></pre>
<p dir="auto">if you do not need SVG?</p>
]]></description><link>https://forum.qt.io/post/834196</link><guid isPermaLink="true">https://forum.qt.io/post/834196</guid><dc:creator><![CDATA[jsulm]]></dc:creator><pubDate>Mon, 01 Dec 2025 16:04:09 GMT</pubDate></item></channel></rss>