It depends. If you are installing CyanogenMod on your phone, then installing GApps is not very legal. However, Cyanogen team has been working with Google to get devices like the OnePlus One certified by Google and preloading them with fully legal GApps package.