Make sure you have Git installed from https://git-scm.com/ or, if you have Windows 10 with Bash, with “sudo apt-get install git”.
Make a new folder where you want to store the source code.
Run “git clone https://github.com/scp-fs2open/fs2open.github.com.git”. The full repo is available at https://github.com/scp-fs2open/fs2open.github.com
Run “git submodule update –init –recursive”.
Make a new Path variable called FS2PATH pointing to your Freespace 2 installation
Download CMake from https://cmake.org/download/
Open up CMake (cmake-gui).
Specify the directory where the source code is and the directory where you want the files to be built (I recommend a clean folder).
Click Configure and select “Eclipse CDT4 – MinGW Makefiles”. You can leave the other options alone. Click Finish.
When the process has completed, you need to set some variables.
CMAKE_ECLIPSE_EXECUTABLE to the path of your Eclipse executable
CMAKE_ECLIPSE_VERSION to 4.5 (Mars), which is the latest available as of CMake 3.7.2
Check FSO_BUILD_TESTS and FSO_BUILD_TOOLS
Uncheck FSO_BUILD_FRED since Fred can only be build in Microsoft Visual Studio.
Uncheck FSO_USE_SPEECH and FSO_USE_VOICEREC. I think these might rely on the Boost library. I will update this post later once I figure it out.
If you have wxWidgets installed, you can check FSO_BUILD_WXFRED2.
If you get an error message, play around with the variables until everything is ok. This setup worked for me. The official FS2 repo README is valuable here.
Then click Generate.
Once that is done, open Eclipse for C/C++ and import the folder where everything was built using File/Open projects from File System.
Expand the Build Targets subcategory and right-click on “all”. Click on Build Target and then wait for a while.
To use your newly build executable, copy all the files in the bin subdirectory of your build folder to your FS2 folder. Alternatively, you could build the “Install” target instead of “all”, although I have not tested this.