codership / galera

Synchronous multi-master replication library
GNU General Public License v2.0
451 stars 176 forks source link

Build for MacOS #660

Open martingg88 opened 6 months ago

martingg88 commented 6 months ago

Anyone know how to build this library for MacOS platform?

sitano commented 3 months ago

yes, here you go https://github.com/MariaDB/galera/pull/20

with something like:

$ mkdir build && cd build

$ cmake .. -G Ninja \
      -DCMAKE_BUILD_TYPE=Debug \
      -DCMAKE_INSTALL_PREFIX="install" \
      -DNOT_FOR_DISTRIBUTION=YES \
      -DCMAKE_VERBOSE_MAKEFILE=ON \
      -DMYSQL_MAINTAINER_MODE=OFF \
      -DOPENSSL_ROOT_DIR=/opt/homebrew/opt/openssl@3

$ PATH=/opt/homebrew/opt/m4/bin:${PATH} cmake --build . --parallel 16
$ cmake --install .