Skip to content

Latest commit

 

History

History
168 lines (95 loc) · 5.76 KB

WINDOWS_BUILD.md

File metadata and controls

168 lines (95 loc) · 5.76 KB

Windows compilation

We are gonna to compile 64bits version of Brakeza3D on Windows using CLion like IDE and MinGW like toolchain for compiling. We will have to download some tools and libraries:

  • CLion: IDE
  • MinGW: toolchain + compilator
  • SDL2: CrossPlatform Basics
  • SDL2_image: CrossPlatform image manipulation
  • SDL2_ttf: CrossPlatform TTF manipulation
  • SDL2_mixer: CrossPlatform sound mixer
  • Assimp: CrossPlatform interface to 3D files
  • Bullet Physics: CrossPlatform physic’s engine
  • GLM: CrossPlatform math’s library
  • SDK OpenCL: CrossPlatform GPU generic interface access

CLion


MinGW

Download MinGW


SDL2

Download SDL2


SDL2_image

Download SDL2_image


SDL2_ttf

Download SDL2_ttf


SDL2_mixer

Download SDL2_mixer


Assimp

Download Assimp


Bullet Physics

Download Bullet Physics


GLM

Download GLM


Saving all download resources

Download Resources

Decompress all download resources

We will unzip MinGW in one folder:

MinGW Folder

... and all the libraries in another:

Descompress Resources

Install CLion + MinGW

Not explanation is required for install Clion. Follow his installer instructions and you will get. MinGW only required decompress the previously downloaded file.

Once MinGW had been decompressed, you need setup CMake toolchain in CLion

File > Setting > Build, Execution, Deployment > Toolchain.

In this option you can select the MinGW previously decompressed folder like this:

Toolchain MinGW


Notes

We will only need to compile for ourselves two things.

  • Bullet
  • Assimp

Once had been decompressed into his individual folder, we can open each of them and compile them individually. This may take a minutes. Rest of libraries (SDL2, SDL2_image, SDL2_ttf, SDL2_mixer, GLM and SDK OpenCL) do not require to be compiled.

GLM is a header library, so that it not have DLL associated. Only development files will be needed.

We are interested in two things about each of these libraries:

  • lib and bin files (.ddl / .a): Files used for compiling and linking. We will move this files into a folder inside MinGW scope.
  • includes (.h, .hpp...): Used for development includes. We will make a folder with all of them to keep easy maintainable

Move DLLs (lib and bin folder's content to MinGW folder)

We will be able to find a LIB and a BIN folder inside our MinGW toolchain.

In each of the libraries you will also find these folders, so that we will go copying this files inside MinGW folders. Here un example inside SDL2 sources folder:

DLLs

Move development header files and update CMakeLists

Now we are gonna to join in a folder all headers needed for development. So we could create a 'include' empty folder.

Same way with lib/bin, you will find a 'include' folder inside each library project. We will go copying to newly 'include' folder.

Development Headers


At last, you will have to update CMakeLists.txt folders route, with newly 'include' folder.

CMake Update


Now you can try to compile Brakeza3D in Windows!