title: How to install subdirectories to different locations with CMake?
body: <p>I have a couple of CMake projects which have their own install logic defined. Now, I want to add a global CMakeLists.txt that adds those projects using <code>add_subdirectory()</code> in order to build and install all of them at once. How can I provide a different <code>${CMAKE_INSTALL_PREFIX}</code> to each of them from the outside?</p>
  
  <p>What I tried is changing the install prefix between the calls to add the subdirectories but they are installed when actually calling <code>make install</code> and at that time, the install prefix is already set to the last assigned value.</p>