STEPS TO BUILD

1. Create a working directory

2. Download SKSE64 project:
	git clone https://github.com/ianpatt/skse64

3. Download common project:
	git clone https://github.com/ianpatt/common

4. Configure common
	cmake -B common/build -S common -DCMAKE_INSTALL_PREFIX=extern common

5. Build and install common to extern/ directory:
	cmake --build common/build --config Release --target install

6. Move the "common/common" directory to the working directory

7. Extract or copy this project to the directory SchlongsOfSkyrim inside the skse64 directory, like this:

common/
    common_vc14.vcxproj
extern
    include/common
    lib/common.lib
skse64
    skse64
    skse64_common
    skse64_loader
    sheets
    SchlongsOfSkyrim

8. Select the SKSE version for the game version.
    - if you need to build for 1.6.353, inside the skse64 directory checkout the tag v2.1.5:
	git reset --hard
	git checkout v2.1.5

    - if you need to build for 1.6.629, inside the skse64 directory:
	git reset --hard
	git checkout v2.2.0

    - if you need to build for 1.6.640:
	git reset --hard
	git checkout v2.2.3

9. Open the SKSE64.SLN in Visual Studio.

10. Retarget all projects to latest toolset version, specially skse64 and skse64_common.

11. Remove common_v14 from the solution.

12. Change skse64 from "Dynamic Library" to "Static Library" in ConfigurationProperties/General of skse64 project properties window.

13. Remove common_v14 from References of skse64_common and skse64. In SchlongsOfSkyrim/References, you should have skse64 and skse64_common, in skse64 you should have only skse64_common, and in skse64_common, you should have nothing inside References. The other projects are not used.

14. Add SchlongsOfSkyrim.vcxproj to the solution.

15. Be sure common.lib (static library built in step 5) is added to SchlongsOfSkyrim as a file, no need to copy. This library will be used instead commmon_v14 project. The common directory needs be the there just to satisfy skse64 dependency during build.

16. Set configuration to Release and start a clean build. Configuration should be the same in Visual Studio and in step 5 (common lib), Release.

* The source code builds on all versions (1.6.659-gog not tested). The important projects on VisualStudio are SchlongsOfSkyrim, skse64 and skse64_common, errors related to the others can be ignored.
