If I try and build all of pico-examples with something like this:
cd pico-examples
mkdir build
cd build
cmake .. -DPICO_SDK_PATH=../../pico-sdk -DPICO_RISCV_TOOLCHAIN_PATH=$(realpath ../../corev-openhw-gcc-ubuntu2204-20240530) -DPICO_ARM_TOOLCHAIN_PATH=/usr -Dpicotool_DIR=$(realpath ../../picotool.install/picotool)
(where ../../picotool.install is the location that I've done a "flat install" of picotool into), then when it gets as far as building the universal examples, it says "No installed picotool with version 2.0.0 found - building from source", and then downloads and builds a fresh copy of picotool! :facepalm:
By looking at https://github.com/raspberrypi/pico-examples/blob/develop/universal/CMakeLists.txt#L55 I was able to get this working with:
i.e. by supplying both -Dpicotool_DIR=$(realpath ../../picotool.install/picotool)and-Dpicotool_INSTALL_DIR=$(realpath ../../picotool.install), but that's obviously a bit awkward / unexpected.
(And as an aside, I have to use realpath in a few places, because some parts of the build don't work properly with relative paths?)
If I try and build all of
pico-examples
with something like this:(where
../../picotool.install
is the location that I've done a "flat install" ofpicotool
into), then when it gets as far as building the universal examples, it says "No installed picotool with version 2.0.0 found - building from source", and then downloads and builds a fresh copy ofpicotool
! :facepalm: By looking at https://github.com/raspberrypi/pico-examples/blob/develop/universal/CMakeLists.txt#L55 I was able to get this working with:i.e. by supplying both
-Dpicotool_DIR=$(realpath ../../picotool.install/picotool)
and-Dpicotool_INSTALL_DIR=$(realpath ../../picotool.install)
, but that's obviously a bit awkward / unexpected.(And as an aside, I have to use
realpath
in a few places, because some parts of the build don't work properly with relative paths?)