Neither Qt 4.8.6 nor 5.5.1 found. Compilation finishes without error, but not rstudio executable created

This is the script we use when generating package builds of RStudio:

In particular, note how we invoke CMake:

cmake -DRSTUDIO_TARGET=$1 \
      -DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE \
      -DRSTUDIO_PACKAGE_BUILD=1 \
      -DRSTUDIO_PACKAGE_VARIANT=$4 \
      -DCMAKE_INSTALL_PREFIX="${CMAKE_INSTALL_PREFIX}" \
      -DGWT_BIN_DIR="$BUILD_DIR/gwt/bin" \
      -DGWT_WWW_DIR="$BUILD_DIR/gwt/www" \
      -DGWT_EXTRAS_DIR="$BUILD_DIR/gwt/extras" \
      $PKG_DIR/../..

The -DRSTUDIO_PACKAGE_BUILD tells RStudio to build against + use the bundled Qt. If that's not set, then you need to tell RStudio where Qt lives. See e.g.

In particular you probably need to set the QT_QMAKE_EXECUTABLE variable.

It's highly recommended that you use the bundled version of Qt, as different bugs and regressions affecting RStudio do pop up in the different Qt releases, and we only test explicitly against the bundled versions of Qt we explicitly prepare our releases against.