<?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>segger project setting</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/83114/segger-project-setting</link><description>hi support team, 
 for ncs, how to add dir to segger IDE like this one. 
 for example, like keil IDE separating those two .c into two folder in segger. 
 
 Regards, 
 William.</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 27 Dec 2021 12:10:13 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/83114/segger-project-setting" /><item><title>RE: segger project setting</title><link>https://devzone.nordicsemi.com/thread/345101?ContentTypeID=1</link><pubDate>Mon, 27 Dec 2021 12:10:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fbdd10ce-0134-4d63-903f-049f799b907b</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;Do you want to automatically add all .c files from one folder?&lt;/p&gt;
&lt;p&gt;In order to take in all .c files in a directory, you will have to manually edit the CMakeLists.txt file in your project.&lt;/p&gt;
&lt;p&gt;Remove this entry:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;target_sources(app PRIVATE src/main.c)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;And replace it with:&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;FILE(GLOB app_sources src/*.c)
target_sources(app PRIVATE ${app_sources})&lt;/pre&gt;&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>