What controls the use of lib64 as CMAKE_INSTALL_LIBDIR?

My local build of zlib on Ubuntu installs to: /usr/local/lib/libz.a

But on the same machine, the OpenSSl installs the libs to: /usr/local/lib64/?