0

I'd like to build MySQL statically. I've checked https://dev.mysql.com/doc/refman/5.7/en/source-configuration-options.html, downloaded the source but unfortunately I'm only used to make and not cmake and I couldn't find anything relevent in the install instructions. So how do I do this?

asx
  • 1
  • 1
  • Possible duplicate of [Compiling a static executable with CMake](http://stackoverflow.com/questions/24648357/compiling-a-static-executable-with-cmake) – usr1234567 Oct 26 '15 at 10:41
  • add `-DBUILD_SHARED_LIBRARIES=OFF` to your cmake call. – usr1234567 Oct 26 '15 at 10:42
  • I tried this option with mysql and got the warning `Manually-specified variables were not used by the project: BUILD_SHARED_LIBRARIES`. Something may have changed with more recent versions of mysql – Cfreak May 18 '16 at 19:54

1 Answers1

1

In mysql-5.7 you need to use -DBUILD_SHARED_LIBS=OFF.

Rikkouri
  • 87
  • 2
  • 9