-
Notifications
You must be signed in to change notification settings - Fork 3
Building
Please make sure you have the following installed on your machine before building CRYMIUM:
During CMake installation, make sure you add its directory to the system PATH (in the installation wizard, choose "Add CMake to the system PATH for all users" or "Add CMake to the system PATH for the current user" when given the choice).
During Visual Studio installation, in the "Workloads" section select "Desktop Development with C++". This will include the required MSVC version of v142.
The CRYMIUM unit tests require CRYENGINE's common unit test files to be installed, which should be in Code\CryEngine\UnitTests\Common
in your CRYENGINE directory (e.g. C:\Program Files (x86)\Crytek\CRYENGINE Launcher\Crytek\CRYENGINE_5.6\Code\CryEngine\UnitTests\Common
).
When you install CRYENGINE via the launcher this directory might be missing. If it is, clone CRYENGINE and copy the Code\CryEngine\UnitTests\Common
directory from here to the same location in your CRYENGINE install directory.
Alternatively, if you'd rather not build the unit tests, you can simply exclude the unit tests from the build by removing or commenting out the following line from CRYMIUM's Code/CMakeLists.txt
file:
add_subdirectory(Crymium.UnitTests)
- Open a command prompt and switch to the directory where you would like to clone CRYMIUM to (e.g.
C:\git
):
cd C:\git
- Clone CRYMIUM:
git clone https://github.com/JonnyOrman/CRYMIUM.git
- Switch to the cloned CRYMIUM directory:
cd CRYMIUM
- Create a build directory and switch to it:
mkdir build
cd build
- Use CMake to produce a Visual Studio solution for the code:
cmake -G "Visual Studio 16" -A x64 ../code
If running the above CMake command gives the error message "'cmake' is not recognized as an internal or external command, operable program or batch file.", run
set PATH="C:\Program Files\CMake\bin\";%PATH%
and then try again.
- In the
build
directory, find and open theCRYMIUM.sln
Visual Studio file. - With the solution open in Visual Studio, select Build > Build Solution.