Getting "not found" errors when using rgbled in C++ project

I have figured it out eventually. What a pain. It’s guess work to figure out what’s needed. You’d think that CMake would figure out what’s used by looking at the source and create the needed includes and linked libs. That’s what smarter systems do, too (e.g. Xcode).

Here’s my working version:

cmake_minimum_required(VERSION 3.12)

# Name of executable.
set(NAME xcode-test)

# imports
include($ENV{PICO_SDK_PATH}/external/pico_sdk_import.cmake)
include($ENV{PIMORONI_PICO_PATH}/pimoroni_pico_import.cmake)

# C/C++ boilerplate.
project(${NAME} C CXX ASM)
set(CMAKE_C_STANDARD 11)
set(CMAKE_CXX_STANDARD 17)

# Initialize the SDK
pico_sdk_init()

# Add all source files
add_executable(
	${NAME} main.cc
)

# Include required libraries
# This assumes `pimoroni-pico` is stored alongside your project
include(common/pimoroni_i2c)
include(common/pimoroni_bus)
#include(libraries/bitmap_fonts/bitmap_fonts)
#include(libraries/hershey_fonts/hershey_fonts)
#include(libraries/pico_explorer/pico_explorer)

include(drivers/hub75/hub75)
include(drivers/button/button)
include(drivers/rgbled/rgbled)
include(libraries/interstate75/interstate75)

# Libraries to link
target_link_libraries(${NAME}
	pimoroni_i2c
#	pico_explorer
	pico_stdlib
	pico_multicore
	hardware_vreg
	hub75
	interstate75
)

# enable usb output
pico_enable_stdio_usb(${NAME} 1)

# Create map/bin/hex/uf2 files 
pico_add_extra_outputs(${NAME})

# Set up files for the release packages
install(FILES
    ${CMAKE_CURRENT_BINARY_DIR}/${NAME}.uf2
    ${CMAKE_CURRENT_LIST_DIR}/README.md
    DESTINATION .
)

set(CPACK_INCLUDE_TOPLEVEL_DIRECTORY OFF)
set(CPACK_GENERATOR "ZIP" "TGZ")
include(CPack)