Debian 12 build - openvas-scanner 22.7.4 'make' doesn't recognize libpath

Having trouble building openvas-scanner 22.7.4 . It complains about not finding libgvm_boreas.so.22 . I have the libs in /opt/gvm/(lib|lib64), and it LOOKS like the path is correct in make, but it could be my ignorance with cmake creating makefiles. Am I overlooking something here?

cmake makes it seems like it found the library, PKG_CONFIG_PATH works for all the other built daemons but it still complains.

+ cmake /home/gb/gbce/source/openvas-scanner-22.7.4 -DCMAKE_INSTALL_PREFIX=/opt/gvm
-DCMAKE_BUILD_TYPE=Release -DINSTALL_OLD_SYNC_SCRIPT=OFF -DSYSCONFDIR=/etc
-DLOCALSTATEDIR=/var -DOPENVAS_FEED_LOCK_PATH=/var/lib/openvas/feed-update.lock
-DOPENVAS_RUN_DIR=/run/ospd

-- Configuring the Scanner...
...
...
-- Looking for clang-format...
-- clang-format not found...
Set LIBDIR to /opt/gvm/lib64  
...
...
--   Found libgvm_util, version 22.7.0
-- Checking for module 'libgvm_boreas>=22.4'
--   Found libgvm_boreas, version 22.7.0                 
...

The build up to linking where it fails.

[ 85%] Linking C executable openvas-nasl-lint
[ 86%] Linking C executable openvas-nasl
/usr/bin/ld: warning: libgvm_boreas.so.22, needed by ../misc/libopenvas_misc.so.22.7.4, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libgvm_boreas.so.22, needed by ../misc/libopenvas_misc.so.22.7.4, not found (try using -rpath or -rpath-link)
[ 88%] Building C object src/CMakeFiles/openvas.dir/main.c.o
[ 89%] Building C object src/CMakeFiles/openvas.dir/nasl_plugins.c.o
/usr/bin/ld: ../misc/libopenvas_misc.so.22.7.4: undefined reference to `is_host_alive'
collect2: error: ld returned 1 exit status
make[2]: *** [nasl/CMakeFiles/openvas-nasl-lint.dir/build.make:99: nasl/openvas-nasl-lint] Error 1
make[1]: *** [CMakeFiles/Makefile2:381: nasl/CMakeFiles/openvas-nasl-lint.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 90%] Building C object src/CMakeFiles/openvas.dir/openvas.c.o
/usr/bin/ld: ../misc/libopenvas_misc.so.22.7.4: undefined reference to `is_host_alive'
[ 92%] Building C object src/CMakeFiles/openvas.dir/pluginlaunch.c.o
collect2: error: ld returned 1 exit status
make[2]: *** [nasl/CMakeFiles/openvas-nasl.dir/build.make:99: nasl/openvas-nasl] Error 1
make[1]: *** [CMakeFiles/Makefile2:354: nasl/CMakeFiles/openvas-nasl.dir/all] Error 2
[ 93%] Building C object src/CMakeFiles/openvas.dir/pluginload.c.o
[ 94%] Building C object src/CMakeFiles/openvas.dir/pluginscheduler.c.o
[ 96%] Building C object src/CMakeFiles/openvas.dir/plugs_req.c.o
[ 97%] Building C object src/CMakeFiles/openvas.dir/processes.c.o
[ 98%] Building C object src/CMakeFiles/openvas.dir/sighand.c.o
[ 98%] Building C object src/CMakeFiles/openvas.dir/utils.c.o
[100%] Linking C executable openvas
[100%] Built target openvas
make: *** [Makefile:166: all] Error 2

Proof of libs in /opt/gvm/lib and /opt/gvm/lib64

gb@gbdev:/opt/gvm$ ls -al /opt/gvm/lib
total 4980
drwxr-xr-x 3 root root    4096 Sep 14 14:05 .
drwxr-xr-x 8 root root    4096 Sep 14 14:04 ..
lrwxrwxrwx 1 root root      17 Sep 14 14:04 libgvm_base.so -> libgvm_base.so.22
lrwxrwxrwx 1 root root      21 Sep 14 14:04 libgvm_base.so.22 -> libgvm_base.so.22.7.0
-rw-r--r-- 1 root root  110064 Sep 14 14:04 libgvm_base.so.22.7.0
lrwxrwxrwx 1 root root      19 Sep 14 14:04 libgvm_boreas.so -> libgvm_boreas.so.22
lrwxrwxrwx 1 root root      23 Sep 14 14:04 libgvm_boreas.so.22 -> libgvm_boreas.so.22.7.0
-rw-r--r-- 1 root root   56200 Sep 14 14:04 libgvm_boreas.so.22.7.0
lrwxrwxrwx 1 root root      16 Sep 14 14:04 libgvm_gmp.so -> libgvm_gmp.so.22
lrwxrwxrwx 1 root root      20 Sep 14 14:04 libgvm_gmp.so.22 -> libgvm_gmp.so.22.7.0
-rw-r--r-- 1 root root   38400 Sep 14 14:04 libgvm_gmp.so.22.7.0
lrwxrwxrwx 1 root root      16 Sep 14 14:04 libgvm_osp.so -> libgvm_osp.so.22
lrwxrwxrwx 1 root root      20 Sep 14 14:04 libgvm_osp.so.22 -> libgvm_osp.so.22.7.0
-rw-r--r-- 1 root root   36112 Sep 14 14:04 libgvm_osp.so.22.7.0
lrwxrwxrwx 1 root root      22 Sep 14 14:04 libgvm-pg-server.so -> libgvm-pg-server.so.22
lrwxrwxrwx 1 root root      26 Sep 14 14:04 libgvm-pg-server.so.22 -> libgvm-pg-server.so.22.8.0
-rw-r--r-- 1 root root   46104 Sep 14 14:04 libgvm-pg-server.so.22.8.0
lrwxrwxrwx 1 root root      17 Sep 14 14:04 libgvm_util.so -> libgvm_util.so.22
lrwxrwxrwx 1 root root      21 Sep 14 14:04 libgvm_util.so.22 -> libgvm_util.so.22.7.0
-rw-r--r-- 1 root root  147040 Sep 14 14:04 libgvm_util.so.22.7.0
lrwxrwxrwx 1 root root      26 Sep 14 14:05 libopenvas_wmiclient.so -> libopenvas_wmiclient.so.22
lrwxrwxrwx 1 root root      30 Sep 14 14:05 libopenvas_wmiclient.so.22 -> libopenvas_wmiclient.so.22.5.3
-rw-r--r-- 1 root root 4641016 Sep 14 14:05 libopenvas_wmiclient.so.22.5.3
drwxr-xr-x 2 root root    4096 Sep 14 14:05 pkgconfig
gb@gbdev:/opt/gvm$ ls -al /opt/gvm/lib64
total 4932
drwxr-xr-x 3 root root    4096 Sep 14 14:05 .
drwxr-xr-x 8 root root    4096 Sep 14 14:04 ..
lrwxrwxrwx 1 root root      17 Sep 14 14:04 libgvm_base.so -> libgvm_base.so.22
lrwxrwxrwx 1 root root      21 Sep 14 14:04 libgvm_base.so.22 -> libgvm_base.so.22.7.0
-rw-r--r-- 1 root root  110064 Sep 14 14:04 libgvm_base.so.22.7.0
lrwxrwxrwx 1 root root      19 Sep 14 14:04 libgvm_boreas.so -> libgvm_boreas.so.22
lrwxrwxrwx 1 root root      23 Sep 14 14:04 libgvm_boreas.so.22 -> libgvm_boreas.so.22.7.0
-rw-r--r-- 1 root root   56200 Sep 14 14:04 libgvm_boreas.so.22.7.0
lrwxrwxrwx 1 root root      16 Sep 14 14:04 libgvm_gmp.so -> libgvm_gmp.so.22
lrwxrwxrwx 1 root root      20 Sep 14 14:04 libgvm_gmp.so.22 -> libgvm_gmp.so.22.7.0
-rw-r--r-- 1 root root   38400 Sep 14 14:04 libgvm_gmp.so.22.7.0
lrwxrwxrwx 1 root root      16 Sep 14 14:04 libgvm_osp.so -> libgvm_osp.so.22
lrwxrwxrwx 1 root root      20 Sep 14 14:04 libgvm_osp.so.22 -> libgvm_osp.so.22.7.0
-rw-r--r-- 1 root root   36112 Sep 14 14:04 libgvm_osp.so.22.7.0
lrwxrwxrwx 1 root root      17 Sep 14 14:04 libgvm_util.so -> libgvm_util.so.22
lrwxrwxrwx 1 root root      21 Sep 14 14:04 libgvm_util.so.22 -> libgvm_util.so.22.7.0
-rw-r--r-- 1 root root  147040 Sep 14 14:04 libgvm_util.so.22.7.0
lrwxrwxrwx 1 root root      26 Sep 14 14:05 libopenvas_wmiclient.so -> libopenvas_wmiclient.so.22
lrwxrwxrwx 1 root root      30 Sep 14 14:05 libopenvas_wmiclient.so.22 -> libopenvas_wmiclient.so.22.5.3
-rw-r--r-- 1 root root 4641016 Sep 14 14:05 libopenvas_wmiclient.so.22.5.3
drwxr-xr-x 2 root root    4096 Sep 14 14:05 pkgconfig

I just can’t seem to force cmake to tell the compiler to use /opt/gvm/lib64 for linking to the library. Any suggestions on what to look at? I’m more used to the old Makefile style of things than cmake.

Thanks.