SC2API
An API for AI for StarCraft II
CMake

If you are already familiar with cmake skip to your platform's building instructions.

  1. Download and install CMake.
  2. Add CMake to your path if the installer didn't add it for you.

Windows

  1. Open your Environment Variables in the System properties menu.
  2. Under System Variables select Path and click 'Edit...'
  3. Append to the Path a semicolon and the string: C: Files
  4. Save, start a new cmd prompt and type cmake, you should see output from cmake.

Building

Windows

To build on windows generate a Visual Studio 2017 solution file with CMake.

  1. Make sure a recursive clone of the project is done to download all submodules.
  2. Enter the working directory.
  3. Create a build directory for CMake artifacts.
  4. Create visual studio project files.
  5. Build with visual studio.
1 git clone --recursive https://github.com/Blizzard/s2client-api
2 cd s2client-api
3 mkdir build
4 cd build
5 cmake ../ -G "Visual Studio 15 2017 Win64"
6 start s2client-api.sln

Mac

To build on Mac generate an Xcode project with CMake.

  1. Make sure a recursive clone of the project is done to download all submodules.
  2. Enter the working directory.
  3. Create a build directory for CMake artifacts.
  4. Create Xcode project files.
  5. Build with Xcode.
1 git clone --recursive https://github.com/Blizzard/s2client-api
2 cd s2client-api
3 mkdir build
4 cd build
5 cmake ../ -G Xcode
6 open s2client-api.xcodeproj/

Linux

To build on Linux generate makefiles with CMake.

  1. Make sure a recursive clone of the project is done to download all submodules.
  2. Enter the working directory
  3. Create a build directory for CMake artifacts.
  4. Create makefiles
  5. Build with make
1 git clone --recursive https://github.com/Blizzard/s2client-api
2 cd s2client-api
3 mkdir build
4 cd build
5 cmake ../
6 make

Working with submodules

If you cloned the repo without specifying –recursive you can initialize and checkout the required submodules with the following git command -

1 git submodule update --init --recursive