The variable CMAKE_INSTALL_PYTHON_LIBDIR is meant to be set by the user? It is not defined by CMake? Shouldn’t it be better called <my_project>_INSTALL_PYTHON_LIBDIR?
Under Debian this yields PYTHON_SITE=lib/python3/dist-packages. A relative path, since the prefix is supplied by CMAKE_INSTALL_PREFIX=/usr/local. Unfortunately though, /usr/local/lib/python3/dist-packages is not in sys.path. We’d rather need /usr/local/lib/python3.${minor}/dist-packages.
So the above is close, but not quite the solution.
I named it that in order to follow GNUInstallDirs naming patterns (it keeps all of the destinations beside each other in the cache). And yes, if the default is not sufficient, the user should set it. You can use fancier logic to get the default (such as the Python code from your SO link).