Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8082

SDK • Re: Do I need include_directories() for every header file

$
0
0
I ended up "brute forcing" it, since I didn't find a more elegant solution.

Code:

$ export PICO_SDK_PATH=/Users/aaronm/bin/dev/raspi-pico/pico-sdk $ find $PICO_SDK_PATH -type d -name include | while read f ; do echo "include_directories( $f )" ; done > ~/bin/dev/raspi-pico/my-projects/20251203-kiddos-ws2812-leds/includes.cmake 
This created a CMake include file of all the "include" directories in the SDK.

In an editor, I commented out every line by default.

In my project root CMakeLists.txt:
include( includes.cmake )

I ran "make," saw that it complained about missing "lwip" includes, so I uncommented the “lwip” lines, and it compiled. Curiously, the binary loaded, and with incorrect SSID and password, it "connected," but that's another issue. The code looks like it executes, and calls the correct libraries, so I can figure out the rest.

Statistics: Posted by aaronm — Thu Dec 04, 2025 9:13 pm



Viewing all articles
Browse latest Browse all 8082

Trending Articles