Search code examples
azerothcore

Cmake on macOS error: Could not find MySQL headers


When running the cmake command in order to compile AzerothCore on macOS Mojave, I'm using the parameteres:

-DMYSQL_ADD_INCLUDE_PATH=/usr/local/include
-DMYSQL_LIBRARY=/usr/local/lib/libmysqlclient_r.dylib

however the cmake fails with the following error:

CMake Error at src/cmake/macros/FindMySQL.cmake:179 (message): Could not find MySQL headers! Please install the development libraries and
headers Call Stack (most recent call first): CMakeLists.txt:93 (find_package)


Solution

  • I solved by installing and linking mysql56 with brew:

    brew install mysql56

    brew link mysql56 --force