Errors with Ghidra repo FetchContent when using CMake less than this
version. FetchContent runs the patch step before update and so we lose
the patches, which can cause build errors.
CMake 3.15 can still be used if you specify your own Ghidra repo on the
command line.
This allows user to specify an arbitrary sleigh compiler. Almost always
it's going to be the sleigh::sleigh_opt target, but in the case of
cross-compiling, that won't work because the host won't be able to run
it.
* Create sleigh_compile CMake module
Useful for other projects that want to compile slaspec files
* Expose sleigh_INSTALL_SPECDIR to reach specfiles
* Use configure_package_config_file
And adjust where the installation of the CMake config files are located
* Fix magic variable in sleighCompile module
* Use MAIN_DEPENDENCY in add_custom_command
* Move some variables around
* Revert needless change
* Cleaning sleighCompile
* Add documentation about new feature
* Docs update
* cmake: Add copyright notice to `sleighCompile` helper
Co-authored-by: Alex Cameron <asc@tetsuo.sh>