There are a few ways ways to do it, depending if you are on 4.7 or 4.8.
1.) Build all of UE4 from source including the plugin.
This is what we did for all of our 4.7 builds. It requires getting UE4 source from github/P4, then following instructions to build UE4. If you drop the FMODStudio into the engine directory, it will build the plugin .dll files used by the editor, and also build the static UE4 executable used in the final builds.
Downside is it requires you to get all of UE4 and build it, which can take hours. Also be aware that the .dll files that come through UE4 source are named differently to the names the binary expects (for 4.7 at least).
If you want a UE4 executable that has the plugin statically linked on any version of UE4, this will work.
2.) Build the plugin from the command-line (4.8 only)
If you are asking the question, you are probably on 4.7. But for completeness, in 4.8 it is now possible to build a plugin on the command-line using the UE4 binary download. The way to do this is to make sure the plugin is NOT in the engine directory, to put it somewhere else, say C:\PluginSourceDir. Then run the following:
C:\Somewhere_To_UE4\4.8\Engine\Build\BatchFiles\runuat BuildPlugin -Plugin=C:\PluginSourceDir\FMODStudio.uplugin -Package=C:\PluginOutputDir\ -Rocket -TargetPlatforms=Win32+Win64
That will produce binaries and intermediate files that will work with the UE4 download. Takes a lot less time than 1, doesn’t need any renaming of anything, and is fairly straightforward. But it only works on 4.8 onwards. Be careful, whatever you put as the output directory gets completely deleted. Don’t put it as root of UE4, or anything important. Avoid C:\ for example.
In 4.8, plugins get relinked so there is no need to build the whole engine any more.
3.) Build the plugin as part of a game (not tested)
In theory, you should be able to put FMODStudio into a game’s code project and build it. You can do this by creating a code project (NOT blueprint only), creating a Plugins directory, and dropping FMODStudio in there. Make sure the plugin is not also in the engine directory at the same time, then build.
This might work in 4.7 but I can’t guarantee that, since it we never built it that way. For 4.7 builds you will need to keep FMODStudio\Libs in the engine directory even if you move the plugin into the game folder.
In summary, if you are on 4.7 and don’t want to move to 4.8, try option 3. If it doesn’t work, go for option 1.