<?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>Raspberry Pico and CMake - create your own C lib or subdirectory with header files</title><link>/products/raspberry-pi/b/blog/posts/raspberry-pico-and-cmake---create-your-own-c-lib-with-header-files</link><description>goal: &amp;quot;how to structure your project, while keeping the IDE happy and the build functionality simple&amp;quot;
When you&amp;#39;re working with the Pico C SDK, you can add a library, like SPI, UART, &amp;hellip; That will (seemingly) automatically add its inclu...</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Raspberry Pico and CMake - create your own C lib or subdirectory with header files</title><link>https://community.element14.com/products/raspberry-pi/b/blog/posts/raspberry-pico-and-cmake---create-your-own-c-lib-with-header-files</link><pubDate>Sun, 27 Nov 2022 05:20:35 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:bcd675de-ca68-4325-8a44-b42d71577bfb</guid><dc:creator>flyingbean</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;I am learning CMake now. Would you recommend some practical CMake reference for Raspberry Pi Pico? I am following this website for my CMake training now: &lt;a rel="nofollow" target="_blank" href="https://cmake.org/cmake/help/latest/guide/tutorial/index.html"&gt;cmake.org/.../index.html&lt;/a&gt;&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=24828&amp;AppID=86&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Raspberry Pico and CMake - create your own C lib or subdirectory with header files</title><link>https://community.element14.com/products/raspberry-pi/b/blog/posts/raspberry-pico-and-cmake---create-your-own-c-lib-with-header-files</link><pubDate>Thu, 24 Nov 2022 21:03:55 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:bcd675de-ca68-4325-8a44-b42d71577bfb</guid><dc:creator>Jan Cumps</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;&lt;strong&gt;Q: What if your subdirectory uses include files from the C SDK?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;If your CMake enabled subdirectory uses C SDK header files, such as SPI, ...., you will have to refer to them in the subdir&amp;#39;s CMakeList.txt&lt;/p&gt;
&lt;p&gt;[embed:dc8ab71f-3b98-42d9-b0f6-e21e02a0f8e2:08cc83eb-ffbe-4c17-8b50-70e80d244383:type=text&amp;text=add_library%28%20m25%0D%0A%20%20%20%20m25.h%0D%0A%20%20%20%20m25.cpp%0D%0A%20%20%20%20%29%0D%0A%0D%0Atarget_link_libraries%28m25%0D%0A%20%20%20%20hardware_clocks%0D%0A%20%20%20%20hardware_resets%0D%0A%20%20%20%20hardware_spi%0D%0A%29%0D%0A%0D%0Atarget_include_directories%28m25%20PUBLIC%20%22%24%7BCMAKE_CURRENT_SOURCE_DIR%7D%22%29]&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=24828&amp;AppID=86&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Raspberry Pico and CMake - create your own C lib or subdirectory with header files</title><link>https://community.element14.com/products/raspberry-pi/b/blog/posts/raspberry-pico-and-cmake---create-your-own-c-lib-with-header-files</link><pubDate>Tue, 22 Nov 2022 00:13:47 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:bcd675de-ca68-4325-8a44-b42d71577bfb</guid><dc:creator>shabaz</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Also, wasn&amp;#39;t there a question on element14 somewhere recently, concerning e-books? Perhaps all the miscellaneous software tips blogs people produce could be wrapped up into a small monthly booklet. A bit like Dr Dobbs used to be, but obviously a lot slimmer. It would encourage people to use the tips in unrelated projects too, since, for instance, the tips here also apply to non-Pico projects too. If they were all in a booklet, people could browse through monthly.&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=24828&amp;AppID=86&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Raspberry Pico and CMake - create your own C lib or subdirectory with header files</title><link>https://community.element14.com/products/raspberry-pi/b/blog/posts/raspberry-pico-and-cmake---create-your-own-c-lib-with-header-files</link><pubDate>Tue, 22 Nov 2022 00:08:08 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:bcd675de-ca68-4325-8a44-b42d71577bfb</guid><dc:creator>shabaz</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Very useful! I&amp;#39;m slowly learning CMake project-by-project, and am glad that the Pico SDK based projects use CMake. Also the libraries&amp;nbsp;are&amp;nbsp;handy when saving projects, since you can then split up your project into separate repositories, and use the git clone submodule functionality to pull in the libraries,&amp;nbsp;to simplify reuse in other projects.&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=24828&amp;AppID=86&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item></channel></rss>