<?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[(reopened) using subdirectories in a CMake project]]></title><description><![CDATA[<p dir="auto">Hi all -</p>
<p dir="auto">I'm still learning my way around CMake. I'd like to create some subdirectories to better organize my project. For now, let's assume I want a subdirectory for some customized QML components. I'll call the subdirectory "custom."</p>
<p dir="auto">How best to add this to my project? I know I can just add an entry for every file in the subdirectory in my main CMakeLists.txt file, but this would make for a large file, plus it's not doing much for the project organization. Should I do an add_subdirectory(custom) line, and if so, what does my subdirectory's CMakeLists.txt file need to contain?</p>
<p dir="auto">Thanks...</p>
]]></description><link>https://forum.qt.io/topic/141780/reopened-using-subdirectories-in-a-cmake-project</link><generator>RSS for Node</generator><lastBuildDate>Fri, 16 Oct 2026 01:46:11 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/141780.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 27 Dec 2022 23:50:55 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to (reopened) using subdirectories in a CMake project on Tue, 03 Jan 2023 05:54:35 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mzimmers">@<bdi>mzimmers</bdi></a> said in <a href="/post/742241">(reopened) using subdirectories in a CMake project</a>:</p>
<blockquote>
<p dir="auto"><a href="https://github.com/mzimmers/demo/blob/main/nga_demo.7z" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/mzimmers/demo/blob/main/nga_demo.7z</a></p>
</blockquote>
<p dir="auto">Ah, ok. It looks like QQmlApplicationEngine doesn't actually try to import modules from the QRC root. Add <code>engine.addImportPath(":/");</code> before your load main.qml.</p>
<p dir="auto">It works on the Desktop because the application was loading your custom module from your build folder. Android can't do that. (It will also not work if you deploy the application to a different Desktop PC)</p>
<p dir="auto">P.S. In the future, please push code directly to GitHub; please don't upload a zip file of your code on GitHub.</p>
]]></description><link>https://forum.qt.io/post/742243</link><guid isPermaLink="true">https://forum.qt.io/post/742243</guid><dc:creator><![CDATA[JKSH]]></dc:creator><pubDate>Tue, 03 Jan 2023 05:54:35 GMT</pubDate></item><item><title><![CDATA[Reply to (reopened) using subdirectories in a CMake project on Tue, 03 Jan 2023 15:00:52 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jksh">@<bdi>JKSH</bdi></a> that was it...thanks!</p>
<p dir="auto">BTW: I pushed the .zip file to the repo because I planned to delete it after the problem was solved (and I've done that now). Sorry if it caused any inconvenience.</p>
]]></description><link>https://forum.qt.io/post/742321</link><guid isPermaLink="true">https://forum.qt.io/post/742321</guid><dc:creator><![CDATA[mzimmers]]></dc:creator><pubDate>Tue, 03 Jan 2023 15:00:52 GMT</pubDate></item><item><title><![CDATA[Reply to (reopened) using subdirectories in a CMake project on Tue, 03 Jan 2023 05:54:35 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mzimmers">@<bdi>mzimmers</bdi></a> said in <a href="/post/742241">(reopened) using subdirectories in a CMake project</a>:</p>
<blockquote>
<p dir="auto"><a href="https://github.com/mzimmers/demo/blob/main/nga_demo.7z" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/mzimmers/demo/blob/main/nga_demo.7z</a></p>
</blockquote>
<p dir="auto">Ah, ok. It looks like QQmlApplicationEngine doesn't actually try to import modules from the QRC root. Add <code>engine.addImportPath(":/");</code> before your load main.qml.</p>
<p dir="auto">It works on the Desktop because the application was loading your custom module from your build folder. Android can't do that. (It will also not work if you deploy the application to a different Desktop PC)</p>
<p dir="auto">P.S. In the future, please push code directly to GitHub; please don't upload a zip file of your code on GitHub.</p>
]]></description><link>https://forum.qt.io/post/742243</link><guid isPermaLink="true">https://forum.qt.io/post/742243</guid><dc:creator><![CDATA[JKSH]]></dc:creator><pubDate>Tue, 03 Jan 2023 05:54:35 GMT</pubDate></item><item><title><![CDATA[Reply to (reopened) using subdirectories in a CMake project on Tue, 03 Jan 2023 05:24:51 GMT]]></title><description><![CDATA[<p dir="auto"><a href="https://github.com/mzimmers/demo/blob/main/nga_demo.7z" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/mzimmers/demo/blob/main/nga_demo.7z</a></p>
<p dir="auto">It's not a minimal example, but the only part that matters (I think) is the "custom" subproject as mentioned in the main CMakeLists.txt.</p>
<p dir="auto">Thanks...</p>
]]></description><link>https://forum.qt.io/post/742241</link><guid isPermaLink="true">https://forum.qt.io/post/742241</guid><dc:creator><![CDATA[mzimmers]]></dc:creator><pubDate>Tue, 03 Jan 2023 05:24:51 GMT</pubDate></item><item><title><![CDATA[Reply to (reopened) using subdirectories in a CMake project on Tue, 03 Jan 2023 05:55:02 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mzimmers">@<bdi>mzimmers</bdi></a> said in <a href="/post/742234">(reopened) using subdirectories in a CMake project</a>:</p>
<blockquote>
<p dir="auto">What code do you want to see?</p>
</blockquote>
<p dir="auto">Ideally, a minimal, compilable project (with any sensitive info removed) that works fine on the desktop but doesn't work on Android. Some ways to do this include:</p>
<ul>
<li>Zip up the project, upload it to a file sharing server and post a link here, OR</li>
<li>Publish your project in a code repository (like GitHub) and post a link here</li>
</ul>
<blockquote>
<p dir="auto">Here's the Android-specific part of my CMakeLists.txt file:</p>
<pre><code>set( ANDROID_PACKAGE_SOURCE_DIR ${PROJECT_SOURCE_DIR}/android CACHE INTERNAL "" )
set_property(TARGET appqmltest APPEND PROPERTY
        QT_ANDROID_PACKAGE_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}
)
</code></pre>
</blockquote>
<p dir="auto">While I haven't developed a QML project for Android in a while, this part doesn't look like a problem.</p>
]]></description><link>https://forum.qt.io/post/742237</link><guid isPermaLink="true">https://forum.qt.io/post/742237</guid><dc:creator><![CDATA[JKSH]]></dc:creator><pubDate>Tue, 03 Jan 2023 05:55:02 GMT</pubDate></item><item><title><![CDATA[Reply to (reopened) using subdirectories in a CMake project on Tue, 03 Jan 2023 02:28:56 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jksh">@<bdi>JKSH</bdi></a> yeah, it works fine for the desktop, just not for Android.</p>
<p dir="auto">What code do you want to see? Here's the Android-specific part of my CMakeLists.txt file:</p>
<pre><code>set( ANDROID_PACKAGE_SOURCE_DIR ${PROJECT_SOURCE_DIR}/android CACHE INTERNAL "" )
set_property(TARGET appqmltest APPEND PROPERTY
        QT_ANDROID_PACKAGE_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}
)
</code></pre>
]]></description><link>https://forum.qt.io/post/742234</link><guid isPermaLink="true">https://forum.qt.io/post/742234</guid><dc:creator><![CDATA[mzimmers]]></dc:creator><pubDate>Tue, 03 Jan 2023 02:28:56 GMT</pubDate></item><item><title><![CDATA[Reply to (reopened) using subdirectories in a CMake project on Tue, 03 Jan 2023 01:54:07 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mzimmers">@<bdi>mzimmers</bdi></a> said in <a href="/post/742208">(reopened) using subdirectories in a CMake project</a>:</p>
<blockquote>
<p dir="auto">got an error that one of my custom Components is not a type</p>
</blockquote>
<p dir="auto">You mean it didn't complain that your import was unrecognized, but if complained that your type is unrecognized? That's a bit strange.</p>
<p dir="auto">Posting some sample code would be helpful.</p>
<p dir="auto">I'd expect it to behave the same on both Android and on Desktop; it would be a bit simpler to troubleshoot on a Desktop target.</p>
]]></description><link>https://forum.qt.io/post/742231</link><guid isPermaLink="true">https://forum.qt.io/post/742231</guid><dc:creator><![CDATA[JKSH]]></dc:creator><pubDate>Tue, 03 Jan 2023 01:54:07 GMT</pubDate></item><item><title><![CDATA[Reply to (reopened) using subdirectories in a CMake project on Mon, 02 Jan 2023 19:37:55 GMT]]></title><description><![CDATA[<p dir="auto">So, I thought I had this working, but I just tried running my app on an Android emulator, and got an error that one of my custom Components is not a type. Is there a nuance to the build process I'm missing, or should I ask this in the Mobile forum?</p>
<p dir="auto">Thanks...</p>
]]></description><link>https://forum.qt.io/post/742208</link><guid isPermaLink="true">https://forum.qt.io/post/742208</guid><dc:creator><![CDATA[mzimmers]]></dc:creator><pubDate>Mon, 02 Jan 2023 19:37:55 GMT</pubDate></item><item><title><![CDATA[Reply to (reopened) using subdirectories in a CMake project on Sun, 01 Jan 2023 14:05:05 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/kshegunov">@<bdi>kshegunov</bdi></a> said in <a href="/post/741926">using subdirectories in a CMake project</a>:</p>
<blockquote>
<p dir="auto">I believe the recommended way is to stick to dynamic QML modules still.</p>
</blockquote>
<p dir="auto">I haven't seen an official recommendation on this. Got a link?</p>
<p dir="auto">Anyway, I recommended a static plugin in this case because <a class="plugin-mentions-user plugin-mentions-a" href="/user/mzimmers">@<bdi>mzimmers</bdi></a>'s goal is to organize his QML code into subfolders.</p>
<ul>
<li>Qt 5 way: Manually write a <code>qmldir</code> file and stick the *.qml + qmldir files inside a QRC resource to be embedded into the main app</li>
<li>Qt 6 way: Let <code>qt_add_qml_module()</code> auto-generate a <code>qmldir</code> file and auto-generate a static plugin to be embedded into the main app</li>
</ul>
<p dir="auto">(There are other ways to use subfolders in the source code; these are my preferences)</p>
<p dir="auto">I would recommend a dynamic plugin if the goal is to create a standalone, reusable module that is to be used by multiple other apps.</p>
]]></description><link>https://forum.qt.io/post/742099</link><guid isPermaLink="true">https://forum.qt.io/post/742099</guid><dc:creator><![CDATA[JKSH]]></dc:creator><pubDate>Sun, 01 Jan 2023 14:05:05 GMT</pubDate></item><item><title><![CDATA[Reply to (reopened) using subdirectories in a CMake project on Fri, 30 Dec 2022 08:50:02 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mzimmers">@<bdi>mzimmers</bdi></a> said in <a href="/post/741845">using subdirectories in a CMake project</a>:</p>
<blockquote>
<p dir="auto">Interesting...I always thought a plug-in was something available separately, that the host program wouldn't even know of until it was added. In this example, we're creating (and linking) a static library, which to my novice mind doesn't seem very much like a plugin.</p>
</blockquote>
<p dir="auto">To elaborate a bit more. Yes, but that's because you chose to build statically. I believe the recommended way is to stick to dynamic QML modules still. In any case, you can have static plugins, it's not unheard of, it's just <em>somewhat</em> unusual - think Qt's image formats for example. If you build Qt statically these are linked in statically as well (and they need to be initialized separately, in Qt5 times you also did this manually).<br />
<a href="https://doc.qt.io/qt-6/plugins-howto.html#static-plugins" target="_blank" rel="noopener noreferrer nofollow ugc">https://doc.qt.io/qt-6/plugins-howto.html#static-plugins</a><br />
<a href="https://doc.qt.io/qt-6/qtplugin.html#Q_IMPORT_PLUGIN" target="_blank" rel="noopener noreferrer nofollow ugc">https://doc.qt.io/qt-6/qtplugin.html#Q_IMPORT_PLUGIN</a></p>
]]></description><link>https://forum.qt.io/post/741926</link><guid isPermaLink="true">https://forum.qt.io/post/741926</guid><dc:creator><![CDATA[kshegunov]]></dc:creator><pubDate>Fri, 30 Dec 2022 08:50:02 GMT</pubDate></item><item><title><![CDATA[Reply to (reopened) using subdirectories in a CMake project on Fri, 30 Dec 2022 02:29:10 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mzimmers">@<bdi>mzimmers</bdi></a> said in <a href="/post/741845">using subdirectories in a CMake project</a>:</p>
<blockquote>
<p dir="auto">Interesting...I always thought a plug-in was something available separately, that the host program wouldn't even know of until it was added.</p>
</blockquote>
<p dir="auto">That's why I said in my previous post: <em>Depends on how you define a "true plugin".</em></p>
<p dir="auto">This is definitely implemented using the plugin interface, but it doesn't "feel" like a plugin. The host program does load the plugin code at runtime even though even though the plugin library is statically-linked.</p>
]]></description><link>https://forum.qt.io/post/741884</link><guid isPermaLink="true">https://forum.qt.io/post/741884</guid><dc:creator><![CDATA[JKSH]]></dc:creator><pubDate>Fri, 30 Dec 2022 02:29:10 GMT</pubDate></item><item><title><![CDATA[Reply to (reopened) using subdirectories in a CMake project on Thu, 29 Dec 2022 15:23:00 GMT]]></title><description><![CDATA[<p dir="auto">Interesting...I always thought a plug-in was something available separately, that the host program wouldn't even know of until it was added. In this example, we're creating (and linking) a static library, which to my novice mind doesn't seem very much like a plugin.</p>
]]></description><link>https://forum.qt.io/post/741845</link><guid isPermaLink="true">https://forum.qt.io/post/741845</guid><dc:creator><![CDATA[mzimmers]]></dc:creator><pubDate>Thu, 29 Dec 2022 15:23:00 GMT</pubDate></item><item><title><![CDATA[Reply to (reopened) using subdirectories in a CMake project on Thu, 29 Dec 2022 10:32:51 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mzimmers">@<bdi>mzimmers</bdi></a> said in <a href="/post/741771">using subdirectories in a CMake project</a>:</p>
<blockquote>
<p dir="auto">So...is this a true plugin?</p>
</blockquote>
<p dir="auto">Yes. If you dig a bit deeper, you'll find the type registration code that's generated by the build chain (I think it was the moc that does it). It's a function stub that's (usually) called automatically for you, however if you're doing weird stuff™ (as I like to do) then you may need to do manual labor for it to get called.</p>
]]></description><link>https://forum.qt.io/post/741808</link><guid isPermaLink="true">https://forum.qt.io/post/741808</guid><dc:creator><![CDATA[kshegunov]]></dc:creator><pubDate>Thu, 29 Dec 2022 10:32:51 GMT</pubDate></item><item><title><![CDATA[Reply to (reopened) using subdirectories in a CMake project on Thu, 29 Dec 2022 03:07:28 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mzimmers">@<bdi>mzimmers</bdi></a> said in <a href="/post/741771">using subdirectories in a CMake project</a>:</p>
<blockquote>
<p dir="auto">Thanks...that seems to work.</p>
</blockquote>
<p dir="auto">Great!</p>
<blockquote>
<p dir="auto">So...is this a true plugin?</p>
</blockquote>
<p dir="auto">Depends on how you define a "true plugin".</p>
<p dir="auto">This is built as a standalone library first, and then linked to your main application later. But you usually won't even notice, since it's all done as part of the same build process.</p>
<p dir="auto">If you want to read about the fine details, see <a href="https://www.qt.io/blog/introduction-to-the-qml-cmake-api" target="_blank" rel="noopener noreferrer nofollow ugc">https://www.qt.io/blog/introduction-to-the-qml-cmake-api</a></p>
<blockquote>
<p dir="auto">I'm actually generating an .a file, which surprises me, as this is a Windows project, in my build directory.</p>
</blockquote>
<p dir="auto">Sounds like you're using MinGW? It uses GCC, so it follows the same conventions as Linux.</p>
<p dir="auto">MSVC will generate a .lib file instead.</p>
<blockquote>
<p dir="auto">I notice that you included the "STATIC" keyword in your solution above. So, it this now a static library, meaning I don't need to include it in any package that I would deliver?</p>
</blockquote>
<p dir="auto">That's right.</p>
<p dir="auto">If you specify "DYNAMIC" instead of "STATIC", you would need to deploy an extra DLL.</p>
]]></description><link>https://forum.qt.io/post/741772</link><guid isPermaLink="true">https://forum.qt.io/post/741772</guid><dc:creator><![CDATA[JKSH]]></dc:creator><pubDate>Thu, 29 Dec 2022 03:07:28 GMT</pubDate></item><item><title><![CDATA[Reply to (reopened) using subdirectories in a CMake project on Thu, 29 Dec 2022 02:48:33 GMT]]></title><description><![CDATA[<p dir="auto">Thanks...that seems to work. So...is this a true plugin? I'm actually generating an .a file, which surprises me, as this is a Windows project, in my build directory. I notice that you included the "STATIC" keyword in your solution above. So, it this now a static library, meaning I don't need to include it in any package that I would deliver?</p>
]]></description><link>https://forum.qt.io/post/741771</link><guid isPermaLink="true">https://forum.qt.io/post/741771</guid><dc:creator><![CDATA[mzimmers]]></dc:creator><pubDate>Thu, 29 Dec 2022 02:48:33 GMT</pubDate></item><item><title><![CDATA[Reply to (reopened) using subdirectories in a CMake project on Thu, 29 Dec 2022 02:03:08 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mzimmers">@<bdi>mzimmers</bdi></a> said in <a href="/post/741767">using subdirectories in a CMake project</a>:</p>
<blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jksh">@<bdi>JKSH</bdi></a> OK, but it appears I need to do a little more here. What do I have to do in order to use:</p>
<pre><code>Item {
   A {}
   B {}
   C {}
}
</code></pre>
<p dir="auto">In my QML code?</p>
</blockquote>
<p dir="auto">Your top-level *.qml file should contain <code>import custom</code> (i.e. you import the <code>URI</code> specified in qt_add_qml_module()). I've updated my earlier post to include this now.</p>
]]></description><link>https://forum.qt.io/post/741768</link><guid isPermaLink="true">https://forum.qt.io/post/741768</guid><dc:creator><![CDATA[JKSH]]></dc:creator><pubDate>Thu, 29 Dec 2022 02:03:08 GMT</pubDate></item><item><title><![CDATA[Reply to (reopened) using subdirectories in a CMake project on Thu, 29 Dec 2022 02:03:19 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jksh">@<bdi>JKSH</bdi></a> OK, but it appears I need to do a little more here. What do I have to do in order to use:</p>
<pre><code>Item {
   A {}
   B {}
   C {}
}
</code></pre>
<p dir="auto">In my QML code?</p>
]]></description><link>https://forum.qt.io/post/741767</link><guid isPermaLink="true">https://forum.qt.io/post/741767</guid><dc:creator><![CDATA[mzimmers]]></dc:creator><pubDate>Thu, 29 Dec 2022 02:03:19 GMT</pubDate></item><item><title><![CDATA[Reply to (reopened) using subdirectories in a CMake project on Thu, 29 Dec 2022 02:57:31 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mzimmers">@<bdi>mzimmers</bdi></a> said in <a href="/post/741762">using subdirectories in a CMake project</a>:</p>
<blockquote>
<p dir="auto">why "customplugin" and not just "custom?"</p>
</blockquote>
<p dir="auto">Because that's the default name generated for the plugin library (e.g. <code>customplugin.lib</code>)</p>
<p dir="auto">You can change the name if you want by setting the <code>PLUGIN_TARGET</code> argument (see <a href="https://doc.qt.io/qt-6/qt-add-qml-module.html" target="_blank" rel="noopener noreferrer nofollow ugc">https://doc.qt.io/qt-6/qt-add-qml-module.html</a> ), but I'm not convinced you should spend that effort.</p>
]]></description><link>https://forum.qt.io/post/741766</link><guid isPermaLink="true">https://forum.qt.io/post/741766</guid><dc:creator><![CDATA[JKSH]]></dc:creator><pubDate>Thu, 29 Dec 2022 02:57:31 GMT</pubDate></item><item><title><![CDATA[Reply to (reopened) using subdirectories in a CMake project on Wed, 28 Dec 2022 23:28:36 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jksh">@<bdi>JKSH</bdi></a> said in <a href="/post/741761">using subdirectories in a CMake project</a>:</p>
<blockquote>
<p dir="auto">PRIVATE Qt6::Quick customplugin</p>
</blockquote>
<p dir="auto">why "customplugin" and not just "custom?"</p>
]]></description><link>https://forum.qt.io/post/741762</link><guid isPermaLink="true">https://forum.qt.io/post/741762</guid><dc:creator><![CDATA[mzimmers]]></dc:creator><pubDate>Wed, 28 Dec 2022 23:28:36 GMT</pubDate></item><item><title><![CDATA[Reply to (reopened) using subdirectories in a CMake project on Thu, 29 Dec 2022 02:02:02 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mzimmers">@<bdi>mzimmers</bdi></a> said in <a href="/post/741732">using subdirectories in a CMake project</a>:</p>
<blockquote>
<p dir="auto">for now, let's assume a directory with a few qml files: A.qml, B.qml, C.qml.</p>
</blockquote>
<p dir="auto">And also assuming that...</p>
<ul>
<li>You're using a non-EOL version of Qt 6</li>
<li>Your top-level project already uses Qt Quick</li>
</ul>
<p dir="auto">...then your subdirectory's CMakeLists.txt should look like this:</p>
<pre><code>cmake_minimum_required(VERSION 3.16)
project(custom)
qt_add_qml_module(custom
    URI custom
    VERSION 1.0
    QML_FILES A.qml B.qml C.qml
    STATIC
)
</code></pre>
<p dir="auto">And your top-level CMakeLists.txt should contain these lines:</p>
<pre><code>add_subdirectory(custom)
target_link_libraries(appMyApp       # Replace "appMyApp" with the name you passed to qt_add_executable()
    PRIVATE Qt6::Quick customplugin
)
</code></pre>
<p dir="auto">And your top-level *.qml file should contain <code>import custom</code> (i.e. you import the <code>URI</code> specified in qt_add_qml_module())</p>
]]></description><link>https://forum.qt.io/post/741761</link><guid isPermaLink="true">https://forum.qt.io/post/741761</guid><dc:creator><![CDATA[JKSH]]></dc:creator><pubDate>Thu, 29 Dec 2022 02:02:02 GMT</pubDate></item><item><title><![CDATA[Reply to (reopened) using subdirectories in a CMake project on Wed, 28 Dec 2022 15:13:32 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jksh">@<bdi>JKSH</bdi></a> for now, let's assume a directory with a few qml files: A.qml, B.qml, C.qml.</p>
]]></description><link>https://forum.qt.io/post/741732</link><guid isPermaLink="true">https://forum.qt.io/post/741732</guid><dc:creator><![CDATA[mzimmers]]></dc:creator><pubDate>Wed, 28 Dec 2022 15:13:32 GMT</pubDate></item><item><title><![CDATA[Reply to (reopened) using subdirectories in a CMake project on Wed, 28 Dec 2022 05:33:23 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mzimmers">@<bdi>mzimmers</bdi></a> said in <a href="/post/741635">using subdirectories in a CMake project</a>:</p>
<blockquote>
<p dir="auto">Should I do an add_subdirectory(custom) line</p>
</blockquote>
<p dir="auto">Yes</p>
<blockquote>
<p dir="auto">and if so, what does my subdirectory's CMakeLists.txt file need to contain?</p>
</blockquote>
<p dir="auto">You'll first need to tell us what those subdirectories contain</p>
]]></description><link>https://forum.qt.io/post/741658</link><guid isPermaLink="true">https://forum.qt.io/post/741658</guid><dc:creator><![CDATA[JKSH]]></dc:creator><pubDate>Wed, 28 Dec 2022 05:33:23 GMT</pubDate></item></channel></rss>