forked from libRocket/libRocket
-
Notifications
You must be signed in to change notification settings - Fork 0
/
how_to_build_for_mingw.txt
42 lines (28 loc) · 1.79 KB
/
how_to_build_for_mingw.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
Download FreeType. Get the Binaries package:
http://gnuwin32.sourceforge.net/packages/freetype.htm
Direct link:
http://gnuwin32.sourceforge.net/downlinks/freetype-bin-zip.php
Extract to Dependencies\freetype
Go into the Build folder and run cmake. However, notice:
** REPLACE C:\MinGW\bin\mingw32-make.exe with the path to your MinGW make.exe file.
** You have to have the C:\MinGW\bin in the path (or cmake will complain for missing libgmp-10.dll, etc).
** You must not have msys/bin in the path, it doesn't work with cmake
** Use -DROCKET_STATIC_LIB if static libs are wanted. However, you will also need -DROCKET_STATIC_LIB to your own application when including Rocket files.
** Notice that the generator "MinGW Makefiles" match the mingw32-make.exe, while the generator "msys Makefiles" match the msys/bin/make.exe. The first combination is used for
compiling from the DOS prompt, and the second one for compiling from a MinGW shell.
cmake -G "MinGW Makefiles" -D CMAKE_MAKE_PROGRAM="c:\MinGW\bin\mingw32-make.exe" -D FREETYPE_INCLUDE_DIRS="..\Dependencies\freetype\include;..\Dependencies\freetype\include
\freetype2" -D FREETYPE_LIBRARY="..\Dependencies\freetype\lib\libfreetype.dll.a" .
Once cmake completes successfully, run make
make
The project will compile and three libraries will be generated in the Build folder, use them to link with your project.
libRocket.dll.a
libRocketControls.dll.a
libRocketDebugger.dll.a
The corresponding dll files are also created, and need to be available when running your application (if not linked statically):
libRocket.a
libRocketControls.a
libRocketDebugger.a
From Dependencies/freetype/bin, get the file:
freetype6.dll
If you get the cryptic error message "Can't correctly start the application (0xc000007b)", then zlib1.dll is also needed (from elsewhere).
Done!