CMake Error, on MacOS, Could not find ZLIB (missing: ZLIB_LIBRARY)

when configuring with cmake in order to compile azerothcore, I am receiving an CMake error where ZLIB can’t be located.
This is what I’m getting:

Lees-MBP-2:build leeelliott$ export OPENSSL_ROOT_DIR=$(brew --prefix openssl@1.1)
Lees-MBP-2:build leeelliott$ cmake ../ \
> -DCMAKE_INSTALL_PREFIX=/leeelliott/azerothcore/server/  \
> -DTOOLS_BUILD=all \
> -DSCRIPTS=static \
> -DMYSQL_ADD_INCLUDE_PATH=/opt/homebrew/include/mysql \
> -DMYSQL_LIBRARY=/opt/homebrew/lib/libmysqlclient.dylib \
> -DREADLINE_INCLUDE_DIR=/opt/homebrew/opt/readline/include \
> -DREADLINE_LIBRARY=/opt/homebrew/opt/readline/lib/libreadline.dylib \
> -DOPENSSL_INCLUDE_DIR="$OPENSSL_ROOT_DIR/include" \
> -DOPENSSL_SSL_LIBRARIES="$OPENSSL_ROOT_DIR/lib/libssl.dylib" \
> -DOPENSSL_CRYPTO_LIBRARIES="$OPENSSL_ROOT_DIR/lib/libcrypto.dylib"
-- CMake version: 3.27.1
-- Running cmake hook: AFTER_LOAD_CONF
-- No hooks registered for AFTER_LOAD_CONF
-- Enabled С++20 standard
-- Detected 64-bit platform
-- UNIX: Using default configuration directory
-- UNIX: Using default library directory
-- UNIX: Configuring uninstall target
-- UNIX: Created uninstall target
-- UNIX: Detected compiler: /usr/bin/cc
-- Clang: Minimum version required is 10.0.0, found 14.0.0.14000029 - ok!
-- Running cmake hook: AFTER_LOAD_CMAKE_MODULES
-- No hooks registered for AFTER_LOAD_CMAKE_MODULES
-- Using mysql-config: /usr/local/bin/mysql_config
-- Found MySQL library: /opt/homebrew/lib/libmysqlclient.dylib
-- Found MySQL headers: /usr/local/include/mysql
-- Found MySQL executable: /usr/local/bin/mysql
-- Found git binary : /usr/local/bin/git

* AzerothCore revision            : a5e84f610a0e 2023-07-26 11:53:12 +0000 (master branch)
* AzerothCore buildtype           : RelWithDebInfo

* Install core to                 : /leeelliott/azerothcore/server
* Install libraries to            : /leeelliott/azerothcore/server/lib
* Install configs to              : /leeelliott/azerothcore/server/etc

* Build applications              : Yes (all)
* Build tools                     : Yes (all)
* Build with scripts              : Yes (static)
* Build with modules              : Yes (static)
* Build unit tests                : No  (default)
* Build core w/PCH                : Yes (default)
* Build scripts w/PCH             : Yes (default)
* Show compile-warnings           : No  (default)
* Use coreside debug              : No  (default)
* Use unix gperftools             : No  (default)
* Use GIT revision hash           : Yes (default)
* Enable vmap DisableMgr checks   : Yes (default)
* Show source tree                : No (For UNIX default)

-- Found OpenSSL library: /usr/local/opt/openssl@1.1/lib/libssl.dylib;/usr/local/opt/openssl@1.1/lib/libcrypto.dylib
-- Found OpenSSL headers: /usr/local/opt/openssl@1.1/include
CMake Error at /usr/local/Cellar/cmake/3.27.1/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
 Could NOT find ZLIB (missing: ZLIB_LIBRARY)
Call Stack (most recent call first):
 /usr/local/Cellar/cmake/3.27.1/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
 /usr/local/Cellar/cmake/3.27.1/share/cmake/Modules/FindZLIB.cmake:200 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
 deps/zlib/CMakeLists.txt:15 (find_package)


-- Configuring incomplete, errors occurred!

I have installed zlib using brew install zlib
Zlib folder appears to be located in /usr/local/cellar/zlib/
How do I get cmake to recognize/find zlib?

Kind Regards,
Lee

Does --debug-find help see where CMake is searching? You can try adding /usr/local/cellar/zlib to CMAKE_PREFIX_PATH, but I think that location is “wrong”. Do you have to “activate” it or something to make it part of the unified Homebrew prefix?