The default install prefix is $HOME. To install in /usr/local, use cmake -DCMAKE_INSTALL_PREFIX=/usr/local .... That should be regardless of using make or ninja though.
In these modern days it might be better to change the default install prefix to $HOME/.local on POSIX machines?
I normally use a symlink from the bin directory to .../build/src/swipl and do install. One of the reasons for that is that all .pl files are accessed from the source, so I can immediately edit them and commit the changes.
Since I installed release 9.1.20 of SWI-Prolog I cannot run @kuniaki.mukai
library(pac) 1.8.3 anymore because of some QLF version error problem.
It did bark at one QLF file included in the library(pac). So I thought
removing the old version and installing the new version library(pac)
1.8.5 would be a cure. But its broken. It shows a couple of errors when
doing use_module(library(pac)) and it cannot do anymore use_module(zdd(zdd)).
One indicative that something is wrong is seen here: