<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>NCS Project Folder Structure Using CMake</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/93345/ncs-project-folder-structure-using-cmake</link><description>I want to build a NCS project with a folder structure that might be something like this 
 
 How can I achieve this using CMake? Is there an alternate way of doing this? Right now I&amp;#39;m including all the libraries in the CMakeLists.txt inside the parent</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 28 Oct 2022 10:45:12 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/93345/ncs-project-folder-structure-using-cmake" /><item><title>RE: NCS Project Folder Structure Using CMake</title><link>https://devzone.nordicsemi.com/thread/392991?ContentTypeID=1</link><pubDate>Fri, 28 Oct 2022 10:45:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:851fed75-af42-4e6d-a76b-0f8c025da903</guid><dc:creator>usmanmehmood55</dc:creator><description>&lt;p&gt;Thank you for the quick response. I will try and implement this, it looks very promising.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;It absolutely works, thank you for the help :)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS Project Folder Structure Using CMake</title><link>https://devzone.nordicsemi.com/thread/392962?ContentTypeID=1</link><pubDate>Fri, 28 Oct 2022 08:56:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bed1798c-034e-4a2a-9c2a-c3cda4726d76</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You use the add_subdirectory() in your root CMakeLists.txt to point to your other CMakeLists.txt files.&lt;/p&gt;
&lt;p&gt;folder_project/CMakeLists.txt should then hold:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;...

add_subdirectory(components/adc)
add_subdirectory(components/twi)
add_subdirectory(main)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Our sample &amp;quot;modem_shell&amp;quot; does something similar by adding many folders and components within its own src/ catalog.&lt;/p&gt;
&lt;p&gt;You can look at that as a reference.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>