Install only necessary dependencies for each build type.