Can't build from source anymore due to cmake not finding shared libraries



Since the commits reagarding cmake cleanups, I can’t build from source anymore:
The Libs are installed, and I also added it to the list of cmake-libraries but cmake doesnt find some libs.

How to get this building again?
@Fuzzard could you give some insights?

Error:

Error with nghttp2:
CMake Error at /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find NGHttp2 (missing: NGHTTP2_LIBRARY) (found version "")
Call Stack (most recent call first):
  /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
  cmake/modules/FindNGHttp2.cmake:31 (find_package_handle_standard_args)
  cmake/modules/FindCurl.cmake:15 (find_package)
  cmake/modules/FindCurl.cmake:87 (buildCurl)
  cmake/scripts/common/Macros.cmake:378 (find_package)
  cmake/scripts/common/Macros.cmake:390 (find_package_with_ver)
  CMakeLists.txt:270 (core_require_dep)

List of libs:

Cant find nghttp2:
cmake -LAH | grep -i http2

NGHTTP2_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libnghttp2.so
pkgcfg_lib_PC_NGHTTP2_nghttp2:FILEPATH=/usr/lib/x86_64-linux-gnu/libnghttp2.so

Error:

Error with Brotli:
CMake Error at /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find Brotli (missing: BROTLICOMMON_LIBRARY BROTLIDEC_LIBRARY)
Call Stack (most recent call first):
  /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
  cmake/modules/FindBrotli.cmake:48 (find_package_handle_standard_args)
  cmake/modules/FindCurl.cmake:17 (find_package)
  cmake/modules/FindCurl.cmake:87 (buildCurl)
  cmake/scripts/common/Macros.cmake:378 (find_package)
  cmake/scripts/common/Macros.cmake:390 (find_package_with_ver)
  CMakeLists.txt:270 (core_require_dep)

List of libs:

Cant find Brotlie:
cmake -LAH | grep -i brotli

BROTLICOMMON:FILEPATH=/usr/lib/x86_64-linux-gnu/libbrotlicommon.a
BROTLICOMMON_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libbrotlicommon.a
BROTLIDEC:FILEPATH=/usr/lib/x86_64-linux-gnu/libbrotlidec.a
BROTLIDEC_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libbrotlidec.a
BROTLI_INCLUDE_DIRTongueATH=/usr/include