Hard to say w/o such a system. I have a Pi.3 (IIRC) but I don't have the
same config and I can't remember to have setup CMake and tried to build
FLTK on it. I have a stock Debian 10 (Buster) VM though which I could
try. I could even update to Debian 11 (Bullseye), maybe.
Can you give some more details, which GL related packages you installed
and the output related to GL/GLU from CMake in a fresh build tree (i.e.
the first CMake run)?
FWIW, I believe installing 'freeglut3-dev' and/or some of the related
'mesa' packages could help, but of course I don't know about the
Bullseye constellation.
From my Linux Mint (based on Ubuntu based on Debian) I get:
$ apt list --installed | grep 'gl.*dev'
freeglut3-dev/focal,now 2.8.1-3 amd64 [installed]
libegl-dev/focal-updates,now 1.3.2-1~ubuntu0.20.04.1 amd64 [installed]
libegl1-mesa-dev/now 21.0.3-0ubuntu0.3~20.04.3 amd64
[installed,upgradable to: 21.0.3-0ubuntu0.3~20.04.5]
libgl-dev/focal-updates,now 1.3.2-1~ubuntu0.20.04.1 amd64 [installed]
libgl1-mesa-dev/now 21.0.3-0ubuntu0.3~20.04.3 amd64
[installed,upgradable to: 21.0.3-0ubuntu0.3~20.04.5]
libgles-dev/focal-updates,now 1.3.2-1~ubuntu0.20.04.1 amd64 [installed]
libgles2-mesa-dev/now 21.0.3-0ubuntu0.3~20.04.3 amd64
[installed,upgradable to: 21.0.3-0ubuntu0.3~20.04.5]
libglew-dev/focal,now 2.1.0-4 amd64 [installed]
libglib2.0-dev-bin/focal-updates,now 2.64.6-1~ubuntu20.04.4 amd64
[installed,automatic]
libglib2.0-dev/focal-updates,now 2.64.6-1~ubuntu20.04.4 amd64 [installed]
libglu1-mesa-dev/focal,now 9.0.1-1build1 amd64 [installed,automatic]
libglvnd-dev/focal-updates,now 1.3.2-1~ubuntu0.20.04.1 amd64 [installed]
libglx-dev/focal-updates,now 1.3.2-1~ubuntu0.20.04.1 amd64 [installed]
libopengl-dev/focal-updates,now 1.3.2-1~ubuntu0.20.04.1 amd64 [installed]
libqt5opengl5-dev/focal,now 5.12.8+dfsg-0ubuntu1 amd64 [installed,automatic]
I'd be interested in
(a) the CMake output before you change anything
(b) the GL related package list on your system (before changes as well)
(c) output if you install one or more packages from the above list (if
it fixes the issue)
This could help to find out where excatly "cmake is not looking in the
right place".