<?xml-stylesheet type="text/xsl" href="https://community.element14.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/"><channel><title>let CMake fetch your build dependencies</title><link>/technologies/code_exchange/b/blog/posts/let-cmake-fetch-your-build-dependencies</link><description>When you work on a project, you often rely on external libraries and source code. If you use CMake as your build tool: it can download the artifacts for you. And make them available during build. By using FetchContent.



use case: your pro...</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: let CMake fetch your build dependencies</title><link>https://community.element14.com/technologies/code_exchange/b/blog/posts/let-cmake-fetch-your-build-dependencies</link><pubDate>Sun, 09 Mar 2025 21:16:25 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:2fc40376-0fb4-4282-ac9a-5768d87ce317</guid><dc:creator>Jan Cumps</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;&lt;span&gt;The FetchContent_Declare&amp;nbsp;declaration has this attribute:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;SOURCE_SUBDIR =&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;m using this, because&amp;nbsp;the GIT repository I want to fetch, has a CMakeLists.txt file in its root. By default, CMake will run that.&lt;/p&gt;
&lt;p&gt;And&amp;nbsp;(in this case) I don&amp;#39;t want that. I just want to fetch the sources, and have CMake make the location available for scripting.&lt;/p&gt;
&lt;p&gt;Setting&amp;nbsp;&lt;span&gt;SOURCE_SUBDIR to empty, takes care of that.&lt;/span&gt;&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=28758&amp;AppID=74&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item></channel></rss>