I tried, and it turns out that for providing the installation directory, it is sufficient to give either CMAKE_INSTALL_PREFIX or installDir. Are they interchangeable or there is a difference between the two?
Yes, I read the documentation, but I did not understand the consequences of setting directly CMAKE_INSTALL_PREFIX in cacheVariables instead of setting installDir, which implicitly populates CMAKE_INSTALL_PREFIX. In other words, what is the role of installDir if I can anyway set it in CMAKE_INSTALL_PREFIX?