Building and installing neovim to location different from CMAKE_INSTALL_PREFIX

Here is the solution to the problem, finally :slight_smile:

The missing step to be able to use cmake’s install functionality was to cd build, the folder created during the build process. So, the steps are:

# build with final target
make CMAKE_BUILD_TYPE=Release CMAKE_INSTALL_PREFIX=/opt/alexj

# create a stow folder for this version
mkdir /opt/alexj/stow/nvim-<version>

# "install" neovim into the stow folder
cd build
cmake -DCMAKE_INSTALL_PREFIX=/opt/alexj/stow/nvim-<version> -P cmake_install.cmake

# create links to the final destination
pushd /opt/alexj/stow
stow -D nvim-<previous> -S nvim-<version>