Skip to content
Tyler Blount edited this page Oct 2, 2021 · 7 revisions

PCS2 requires three external dependencies in order to build correctly. The first of which is wxWidgets and the second is Boost, and the last is DevIL.

Building and Linking wxWidgets

If you are lucky, you can download a precompiled library package from wxWidget's downloads page that will suit your particular Operating System.

If you are not lucky, or wish to use a custom version of wxWidgets, you'll have to build and compile it from the source. TODO: Provide link to wxWidget's "building from source" tutorial.

PCS2 is being upgraded to use wxWidgets 3.0.5 in order to support VC 2019.

It is recommended to install wxWidgets to C:/Code/wxWidgets-3.0.5 on Windows as this will allow CMake to find it automatically.

Linking Boost

Boost for the most part is a header-only library, thankfully PCS2 doesn't use any of the features in boost that require building (I hope). PCS2 uses Boost version 1.72 or later. You can get Boost from here.

Linking Boost on Windows

It is highly recommended that you set the BOOST_ROOT, BOOST_INCLUDEDIR, and BOOST_LIBRARYDIR environment variables to help CMake find the right libraries. In modern installations of Boost, you will often find that BOOST_ROOT and BOOST_INCLUDEDIR are identical, with BOOST_LIBRARYDIR being somewhere within the directory structure.

Linking DevIL

The last dependency to link to is DevIL, a image loading and manipulation library that PCS2 uses to handle the various texture and material formats. You can get DevIL from here.

Linking DevIL on Windows

Get the DevIL 1.7.8 SDK and extract it to a directory of your choice. z64555 recommends to extract it to C:\Code\DevIL\DevIL-SDK since the hierarchy is similar to what the DevIL developers use.

Set up a Windows Environment variable named DevIL_ROOT and have it reference your install location (such as C:\Code\DevIL\DevIL-SDK).

Building on Linux (Debbie Stretch)

Install dependencies

 $ apt-get install cmake libboost-regex-dev libboost-filesystem-dev libboost-system-dev libsdl1.2-dev libdevil-dev g++ gcc make

Get the code & make:

$ git clone https://github.com/scp-fs2open/PCS2.git
$ mkdir PCS2/build && cd PCS2/build
$ cmake -G "Unix Makefiles" ../
$ make

If you have nVidia drivers you might need to fix a broken link:

$ sudo ln -fs /usr/lib/libGL.so /usr/lib/x86_64-linux-gnu/libGL.so
$ make