blob: 7c4ea1d09f044437b16e099feeb4958cd095f8b5 [file] [log] [blame]
DRC2c0ea902010-04-16 07:33:41 +00001*******************************************************************************
DRC667df922011-06-23 10:11:22 +00002** Building TigerVNC
DRC2c0ea902010-04-16 07:33:41 +00003*******************************************************************************
4
5
DRC667df922011-06-23 10:11:22 +00006================================
7Build Requirements (All Systems)
8================================
DRC2c0ea902010-04-16 07:33:41 +00009
DRC667df922011-06-23 10:11:22 +000010-- CMake (http://www.cmake.org) v2.8 or later
11
12-- FLTK 1.3.0
DRCce355e32011-06-24 04:58:01 +000013 * Must be patched using fltk/extensions.patch (in the TigerVNC source
14 directory) to get full functionality
DRC667df922011-06-23 10:11:22 +000015 * See "Building FLTK" below.
DRC2c0ea902010-04-16 07:33:41 +000016
DRC69854b42011-05-13 09:31:24 +000017-- If building TLS support:
18 * GnuTLS and its dependencies (libgcrypt, libtasn1, libgpg-error)
19
DRCce355e32011-06-24 04:58:01 +000020-- If building native language support (NLS):
21 * Gnu gettext 0.14.4 or later
22 * See "Building Native Language Support" below.
23
DRC667df922011-06-23 10:11:22 +000024-- libjpeg-turbo SDK
DRCce355e32011-06-24 04:58:01 +000025 * If your system does not include libjpeg-turbo, then you can download the
26 SDK from http://sourceforge.net/projects/libjpeg-turbo/files/
DRC667df922011-06-23 10:11:22 +000027
28
29=========================
30Build Requirements (Unix)
31=========================
32
33-- Non-Mac platforms:
34 * X11 development kit
35
DRC2c0ea902010-04-16 07:33:41 +000036-- If building Xvnc:
DRC667df922011-06-23 10:11:22 +000037 * autoconf 2.57 or later
38 * automake 1.7 or later
39 * libtool 1.4 or later
40 * OpenSSL v0.9.7 or later
DRC2c0ea902010-04-16 07:33:41 +000041 * Python v2.3 or later
42 * zlib v1.2 or later
DRC2c0ea902010-04-16 07:33:41 +000043
DRC69854b42011-05-13 09:31:24 +000044 * pkgconfig 0.20 or later
45 If you are using an older RPM-based system which does not meet this
46 minimum requirement (such as Red Hat Enterprise Linux 4), then you can
47 build pkgconfig 0.20 from the Fedora 5 source RPM:
48 http://archive.fedoraproject.org/pub/archive/fedora/linux/core/5/source/SRPMS/pkgconfig-0.20-2.2.1.src.rpm
49
DRC69854b42011-05-13 09:31:24 +000050 * gettext 0.14.4 or later
51 If you are using an older RPM-based system which does not meet this
52 minimum requirement (such as Red Hat Enterprise Linux 4), then you can
53 build gettext 0.14.5 from the Fedora 5 source RPM:
54 http://archive.fedoraproject.org/pub/archive/fedora/linux/core/5/source/SRPMS/gettext-0.14.5-3.src.rpm
55 NOTE: gcj and libgcj are required when building the above source RPM.
DRC2b0b1942011-02-09 03:10:44 +000056
DRC2c0ea902010-04-16 07:33:41 +000057
DRC667df922011-06-23 10:11:22 +000058============================
59Build Requirements (Windows)
60============================
DRC180c0162010-10-27 07:20:27 +000061
62-- Microsoft Visual C++ 2005 or later
63
64 If you don't already have Visual C++, then the easiest way to get it is by
65 installing the Windows SDK:
66
67 http://msdn.microsoft.com/en-us/windows/bb980924.aspx
68
69 The Windows SDK includes both 32-bit and 64-bit Visual C++ compilers and
70 everything necessary to build TigerVNC.
71
72 * For 32-bit builds, you can also use Microsoft Visual C++ Express
73 Edition. Visual C++ Express Edition is a free download.
74 * If you intend to build TigerVNC from the command line, then add the
75 appropriate compiler and SDK directories to the INCLUDE, LIB, and PATH
76 environment variables. This is generally accomplished by executing
77 vcvars32.bat or vcvars64.bat and SetEnv.cmd. vcvars32.bat and
78 vcvars64.bat are part of Visual C++ and are located in the same directory
79 as the compiler. SetEnv.cmd is part of the Windows SDK. You can pass
80 optional arguments to SetEnv.cmd to specify a 32-bit or 64-bit build
81 environment.
82
83... OR ...
84
85-- MinGW
86
DRC180c0162010-10-27 07:20:27 +000087-- Inno Setup (needed to build the TigerVNC installer)
88 Inno Setup can be downloaded from http://www.jrsoftware.org/isinfo.php.
89 You also need the Inno Setup Preprocessor, which is available in the
90 Inno Setup QuickStart Pack.
91
92 Add the directory containing iscc.exe (for instance,
93 C:\Program Files\Inno Setup 5) to the system or user PATH environment
94 variable prior to building TigerVNC.
95
DRC667df922011-06-23 10:11:22 +000096
97=============
98Building FLTK
99=============
100
101Currently, TigerVNC requires functionality that is not yet included in the
102upstream version of FLTK. Thus, it will be necessary to build FLTK from
103source. To do this:
104
1051. Download the FLTK 1.3.0 source tarball from http://www.fltk.org/
1062. Extract the source tarball
1073. cd fltk-1.3.0
1084. patch -p1 < {tigervnc_source_directory}/fltk/extensions.patch
1095. Use CMake to build FLTK using the same procedures described below for
110 building TigerVNC. The recipes in the "Build Recipes" section also apply.
1116. (optional) Use 'make install' to install FLTK into a directory of your
112 choosing.
1137. When building TigerVNC, set the FLTK_FLUID_EXECUTABLE CMake variable to the
114 location of the fluid executable that was built in Step 5 or installed in
115 Step 6. This gives CMake a hint as to where to find the FLTK library.
1168. If you did not install FLTK, then set the FLTK_INCLUDE_DIR CMake variable to
117 the location of the FLTK source directory.
DRC2b0b1942011-02-09 03:10:44 +0000118
DRC180c0162010-10-27 07:20:27 +0000119
120==================
121Out-of-Tree Builds
122==================
123
124Binary objects, libraries, and executables are generated in the same directory
125from which cmake was executed (the "binary directory"), and this directory need
126not necessarily be the same as the TigerVNC source directory. You can create
127multiple independent binary directories, in which different versions of
128TigerVNC can be built from the same source tree using different compilers or
129settings. In the sections below, {build_directory} refers to the binary
130directory, whereas {source_directory} refers to the TigerVNC source directory.
131For in-tree builds, these directories are the same.
132
133
134=================
135Building TigerVNC
136=================
137
138
DRC667df922011-06-23 10:11:22 +0000139Unix/Mac
140--------
141
142The following procedure will build the TigerVNC Viewer on Linux and Unix
143systems. On 64-bit systems, this will build a 64-bit version of TigerVNC. See
144"Build Recipes" for specific build instructions for building a 32-bit version
145of TigerVNC on 64-bit systems.
146
147 cd {build_directory}
148 cmake -G "Unix Makefiles" {source_directory} [additional CMake flags]
149 make
150
151Building the TigerVNC Server (Xvnc) is a bit trickier. On newer systems
152containing Xorg 7.4 or later (such as Fedora), Xvnc is typically built to use
153the X11 shared libraries provided with the system. The procedure for this is
154very system-specific, since it requires specifying such things as font and X
155resource directories. Thus, it cannot be described in terms general enough for
156this document.
157
158Those using systems with older versions of Xorg must build a "legacy-friendly"
159version of the TigerVNC Server. This is accomplished by downloading and
160building the more recent Xorg modules in a local directory and then building
161Xvnc such that it links against the local build of these libraries, not the X11
162libraries installed on the system. The "build-xorg" script in the TigerVNC
163source distribution (located under unix/) automates this process.
164
165The following procedure will build both the TigerVNC Viewer and a
166"legacy-friendly" version of the TigerVNC Server:
167
168 cd {build_directory}
169 sh {source_directory}/unix/build-xorg init
170 sh {source_directory}/unix/build-xorg build [additional CMake flags]
171
172build-xorg generates a version of Xvnc that has no external dependencies on the
173X11 shared libraries or any other distribution-specific shared libraries. This
174version of Xvnc should be transportable across multiple O/S distributions.
175build-xorg should work on Red Hat Enterprise 4, its contemporaries, and later
176systems. It probably will not work on older systems. It has not been tested
177on non-Linux systems (yet).
178
179build-xorg can also be used to rebuild just the TigerVNC Server and Viewer,
180once the X11 modules and other dependencies have been built for the first time.
181This is convenient for testing changes that just apply to the TigerVNC source
182code. To accomplish this, run:
183
184 sh {source_directory}/unix/build-xorg rebuild [additional make flags]
185
186For instance,
187
188 sh {source_directory}/unix/build-xorg rebuild clean
189
190will clean both the Xvnc and vncviewer builds without destroying any of the
191build configuration or module dependencies.
192
193
DRC180c0162010-10-27 07:20:27 +0000194Visual C++ (Command Line)
195-------------------------
196
197 cd {build_directory}
198 cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release {source_directory}
199 nmake
200
201This will build either a 32-bit or a 64-bit version of TigerVNC, depending
202on which version of cl.exe is in the PATH.
203
204
205Visual C++ (IDE)
206----------------
207
208Choose the appropriate CMake generator option for your version of Visual Studio
209(run "cmake" with no arguments for a list of available generators.) For
210instance:
211
212 cd {build_directory}
213 cmake -G "Visual Studio 9 2008" {source_directory}
214
215You can then open ALL_BUILD.vcproj in Visual Studio and build one of the
216configurations in that project ("Debug", "Release", etc.) to generate a full
217build of TigerVNC.
218
219
220MinGW
221-----
222
223 cd {build_directory}
224 cmake -G "MSYS Makefiles" {source_directory}
225 make
226
227This will generate only vncviewer. Currently, Visual C++ must be used to build
228WinVNC.
229
230
231Debug Build
232-----------
233
Adam Tkacf586b842011-04-27 11:20:18 +0000234Add "-DCMAKE_BUILD_TYPE=Debug" to the CMake command line. Or, if building with
DRC180c0162010-10-27 07:20:27 +0000235NMake, remove "-DCMAKE_BUILD_TYPE=Release" (Debug builds are the default with
236NMake.)
237
238
DRC8290dd62011-02-10 22:54:36 +0000239Self-Contained MinGW Build
240--------------------------
241
242If TigerVNC is built using MinGW, then it may depend on the MinGW libgcc DLL.
243To eliminate this dependency, add
244
245 -DCMAKE_C_FLAGS=-static-libgcc -DCMAKE_CXX_FLAGS=-static-libgcc
246
Adam Tkacf586b842011-04-27 11:20:18 +0000247to the CMake command line.
DRC8290dd62011-02-10 22:54:36 +0000248
249
DRCce355e32011-06-24 04:58:01 +0000250======================================
251Building Native Language Support (NLS)
252======================================
253
254NLS requires gettext, which is supplied with most Linux distributions but not
255with most other operating systems. Building gettext from source is
256straightforward on Mac and other Unix variants, but on Windows it requires
257MinGW. Thus, it is not possible to enable NLS when building TigerVNC with
258Visual C++.
259
260You can override the ICONV_LIBRARIES and LIBINTL_LIBRARY CMake variables to
261specify the locations of libiconv and libintl, respectively. For instance,
262adding
263
264 -DLIBINTL_LIBRARY=/opt/gettext/lib/libintl.a
265
266to the CMake command line would link TigerVNC against a static version of
267libintl located under /opt/gettext. Adding
268
269 -DICONV_INCLUDE_DIR=/mingw/include \
270 -DICONV_LIBRARIES=/mingw/lib/libiconv.a \
271 -DGETTEXT_INCLUDE_DIR=/mingw/include \
272 -DLIBINTL_LIBRARY=/mingw/lib/libintl.a
273
274to the CMake command line would link TigerVNC against the static versions of
275libiconv and libintl included in the MinGW Developer Toolkit.
276
277
278===============================================
279Building Transport Layer Security (TLS) support
280===============================================
DRC8290dd62011-02-10 22:54:36 +0000281
Adam Tkac445d4ed2011-04-27 11:04:01 +0000282VeNCrypt (the TigerVNC security and authentication extensions) can be built
283with TLS support, which provides built-in encryption for VNC sessions. This
DRCce355e32011-06-24 04:58:01 +0000284requires GnuTLS, which is readily available in many Linux distributions but not
285as readily available in binary form on other types of systems. This section
DRC667df922011-06-23 10:11:22 +0000286describes the issues associated with building a version of TigerVNC with TLS
287support and how to work around those issues.
Adam Tkacf586b842011-04-27 11:20:18 +0000288
DRC667df922011-06-23 10:11:22 +0000289
290Unix/Mac
291--------
292
293In general, if you are building on a Unix-ish platform that has the GnuTLS
294libraries and include files installed in the standard system locations, then
295the TigerVNC build system should detect the system version of GnuTLS
296automatically and link against it. However, this produces a version of
297TigerVNC that depends on the GnuTLS dynamic libraries, and thus the TigerVNC
298binaries are not portable.
299
DRCce355e32011-06-24 04:58:01 +0000300To build a fully portable, cross-compatible version of TigerVNC with TLS
DRC667df922011-06-23 10:11:22 +0000301support, it is necessary to link against the GnuTLS static library (as well
302as the static libraries of its dependencies.) If you are lucky enough, then
303your O/S distribution may include pre-packaged versions of these static
304libraries. Otherwise, it will be necessary to build GnuTLS, libgcrypt,
305libtasn1, and libgpg-error from source.
306
307You can manipulate the GNUTLS_INCLUDE_DIR and GNUTLS_LIBRARY CMake variables to
DRCce355e32011-06-24 04:58:01 +0000308build TigerVNC against a custom build of GnuTLS that is installed in a
309non-system directory. For instance, adding
DRC667df922011-06-23 10:11:22 +0000310
311 -DGNUTLS_INCLUDE_DIR=/opt/gnutls/include \
312 -DGNUTLS_LIBRARY='/opt/gnutls/lib/libgnutls.a;/opt/gnutls/lib/libgcrypt.a;/opt/gnutls/lib/libgpg-error.a;/opt/gnutls/lib/libtasn1.a' \
313 -DUSE_INCLUDED_ZLIB=1
314
315to the CMake or 'build-xorg build' command line will cause TigerVNC to be
316statically linked against a custom installation of GnuTLS that resides under
DRCce355e32011-06-24 04:58:01 +0000317/opt/gnutls. GnuTLS depends on zlib, so specifying -DUSE_INCLUDED_ZLIB=1 will
DRC667df922011-06-23 10:11:22 +0000318satisfy that dependency using TigerVNC's in-tree version of zlib, which
319prevents TigerVNC from depending on the libz dynamic library.
320
321
322MinGW
323-----
DRC8290dd62011-02-10 22:54:36 +0000324
325An installer containing the GnuTLS header files, as well as static and dynamic
Adam Tkacf586b842011-04-27 11:20:18 +0000326link libraries for 32-bit MinGW, can be downloaded from the following site:
DRC8290dd62011-02-10 22:54:36 +0000327
328http://josefsson.org/gnutls4win/
329
Adam Tkacf586b842011-04-27 11:20:18 +0000330As of this writing, GnuTLS cannot be built cleanly with MinGW64 due to the fact
331that portions of the code assume an LP64 data model (Windows uses LLP64.)
332Thus, it is not possible at this time to produce a Win64 version of TigerVNC
333with TLS support.
DRC8290dd62011-02-10 22:54:36 +0000334
Adam Tkacf586b842011-04-27 11:20:18 +0000335Whether you use the above installer or build GnuTLS from source, make sure that
336you install the libraries and headers into a pathname that doesn't contain
337spaces (the installer will try to install under c:\Program Files unless you
338tell it otherwise.) If the GnuTLS include path contains spaces, then the MinGW
339resource compiler will barf when you try to build TigerVNC.
340
341You can manipulate the GNUTLS_INCLUDE_DIR and GNUTLS_LIBRARY CMake variables to
DRC8290dd62011-02-10 22:54:36 +0000342specify the directory under which you installed GnuTLS. For instance, adding
343
344 -DGNUTLS_INCLUDE_DIR=/c/gnutls/include \
Adam Tkacf586b842011-04-27 11:20:18 +0000345 -DGNUTLS_LIBRARY=/c/gnutls/lib/libgnutls.dll.a
346
347to the CMake command line when using MinGW will cause TigerVNC to be linked
348against GnuTLS DLLs that are installed under c:\gnutls.
349
350Adding
351
352 -DGNUTLS_INCLUDE_DIR=/c/gnutls/include \
DRC8290dd62011-02-10 22:54:36 +0000353 -DGNUTLS_LIBRARY='/c/gnutls/lib/libgnutls.a;/c/gnutls/lib/libgcrypt.a;/c/gnutls/lib/libtasn1.a;/c/gnutls/lib/libgpg-error.a'
354
Adam Tkacf586b842011-04-27 11:20:18 +0000355to the CMake command line will cause TigerVNC to be statically linked against
356GnuTLS libraries that are installed under c:\gnutls.
357
358Note that the use of MinGW means that only the TigerVNC viewer can be built,
359not the server.
360
DRC667df922011-06-23 10:11:22 +0000361
Adam Tkacf586b842011-04-27 11:20:18 +0000362Visual C++
363----------
364
365There is generally no sane way to build GnuTLS and its dependencies using
366Visual C++. Thus, it is necessary to either build the libraries with MinGW (or
367download 32-bit versions of these from the link above), generate Visual C++
368import libraries from the DLLs, then link TigerVNC against the Visual C++
369import libraries.
370
371In the instructions below, {gnutls_path} indicates the path under which GnuTLS
372is installed (Example: c:\Program Files\GnuTLS-2.10.1).
373
374To generate Visual C++ import libraries:
375
376cd {gnutls_path}\lib
377lib /def:..\bin\libgnutls-{version}.def /out:libgnutls.lib
378
379Now, you can add the following arguments to the CMake command line:
380
381 -DGNUTLS_INCLUDE_DIR={gnutls_path}\include \
382 -DGNUTLS_LIBRARY={gnutls_path}\lib\libgnutls.lib
383
384to build TigerVNC against the GnuTLS DLLs installed under {gnutls_path}.
DRC8290dd62011-02-10 22:54:36 +0000385
386
DRC180c0162010-10-27 07:20:27 +0000387===================
388Installing TigerVNC
389===================
390
391You can use the build system to install TigerVNC into a directory of your
DRC667df922011-06-23 10:11:22 +0000392choosing. To do this, add:
DRC180c0162010-10-27 07:20:27 +0000393
394 -DCMAKE_INSTALL_PREFIX={install_directory}
395
DRC667df922011-06-23 10:11:22 +0000396to the CMake command line. Then, after building TigerVNC, you can run
397'make install' or 'nmake install' (or build the "install" target in the Visual
398Studio IDE) to install it.
DRC180c0162010-10-27 07:20:27 +0000399
400If you don't specify CMAKE_INSTALL_PREFIX, then the default is
DRC667df922011-06-23 10:11:22 +0000401c:\Program Files\TigerVNC on Windows and /usr/local on Unix.
DRC180c0162010-10-27 07:20:27 +0000402
403
DRC667df922011-06-23 10:11:22 +0000404=========================
405Creating Release Packages
406=========================
407
408The following commands can be used to create various types of release packages:
409
410
411Unix
412----
413
DRC667df922011-06-23 10:11:22 +0000414make tarball
415
416 Create a binary tarball containing the TigerVNC Viewer
417
418make servertarball
419
420 Create a binary tarball containing both the TigerVNC Server and Viewer
421
422make dmg
423
DRCaab38302011-06-25 20:24:02 +0000424 Create Macintosh disk image file that contains an application bundle of the
425 TigerVNC Viewer
DRC667df922011-06-23 10:11:22 +0000426
DRCaab38302011-06-25 20:24:02 +0000427make udmg
DRC667df922011-06-23 10:11:22 +0000428
429 On 64-bit OS X systems, this creates a version of the Macintosh package and
430 disk image which contains universal i386/x86-64 binaries. You should first
431 configure a 32-bit out-of-tree build of TigerVNC, then configure a 64-bit
432 out-of-tree build, then run 'make udmg' from the 64-bit build directory. The
433 build system will look for the 32-bit build under {source_directory}/osxx86
DRCaab38302011-06-25 20:24:02 +0000434 by default, but you can override this by setting the OSX_X86_BUILD CMake
435 variable to the directory containing your configured 32-bit build. Either
436 the 64-bit or 32-bit build can be configured to be backward compatible by
437 using the instructions in the "Build Recipes" section.
DRC667df922011-06-23 10:11:22 +0000438
439
440Windows
441-------
442
443If using NMake:
444
445 cd {build_directory}
446 nmake installer
447
448If using MinGW:
449
450 cd {build_directory}
451 make installer
452
453If using the Visual Studio IDE, build the "installer" project.
454
455The installer package (TigerVNC[64].exe) will be located under
456{build_directory}. If building using the Visual Studio IDE, then the installer
457package will be located in a subdirectory with the same name as the
458configuration you built (such as {build_directory}\Debug\ or
459{build_directory}\Release\).
460
461NOTE: If TigerVNC is built with TLS support, then the build system will
462attempt to package the GnuTLS DLLs into the Windows installer. It looks for
463these DLLs in a directory called "bin" one level up from GNUTLS_INCLUDE_DIR.
464
465
466=============
467Build Recipes
468=============
469
470
47132-bit Build on 64-bit Linux/Unix (including OS X)
472--------------------------------------------------
473
474Set the following environment variables before running CMake or
475'build-xorg build':
476
477 CFLAGS='-O3 -m32'
478 CXXFLAGS='-O3 -m32'
479 LDFLAGS=-m32
480
481
48264-bit Backward-Compatible Build on 64-bit OS X
483-----------------------------------------------
484
485Add
486
487 -DCMAKE_OSX_SYSROOT=/Developer/SDKs/MacOSX10.5.sdk \
488 -DCMAKE_OSX_DEPLOYMENT_TARGET=10.5
489
490to the CMake command line. The OS X 10.5 SDK must be installed.
491
492
49332-bit Backward-Compatible Build on 64-bit OS X
494-----------------------------------------------
495
496Set the following environment variables:
497
498 CC=gcc-4.0
499 CXX=g++-4.0
500 CFLAGS='-O3 -m32'
501 CXXFLAGS='-O3 -m32'
502 LDFLAGS=-m32
503
504and add
505
506 -DCMAKE_OSX_SYSROOT=/Developer/SDKs/MacOSX10.4u.sdk \
507 -DCMAKE_OSX_DEPLOYMENT_TARGET=10.4
508
509to the CMake command line. The OS X 10.4 SDK must be installed.
DRC180c0162010-10-27 07:20:27 +0000510
511
51264-bit MinGW Build on Cygwin
513----------------------------
514
515 cd {build_directory}
516 CC=/usr/bin/x86_64-w64-mingw32-gcc CXX=/usr/bin/x86_64-w64-mingw32-g++ \
517 RC=/usr/bin/x86_64-w64-mingw32-windres \
518 cmake -G "Unix Makefiles" -DCMAKE_SYSTEM_NAME=Windows \
519 -DCMAKE_AR=/usr/bin/x86_64-w64-mingw32-ar \
520 -DCMAKE_RANLIB=/usr/bin/x86_64-w64-mingw32-ranlib {source_directory}
521 make
522
523This produces a 64-bit build of TigerVNC that does not depend on cygwin1.dll or
524other Cygwin DLL's. The mingw64-x86_64-gcc-core and mingw64-x86_64-gcc-g++
525packages (and their dependencies) must be installed.
526
527
52832-bit MinGW Build on Cygwin
529----------------------------
530
531 cd {build_directory}
532 CC=/usr/bin/i686-w64-mingw32-gcc CXX=/usr/bin/i686-w64-mingw32-g++ \
533 RC=/usr/bin/i686-w64-mingw32-windres \
534 cmake -G "Unix Makefiles" -DCMAKE_SYSTEM_NAME=Windows \
535 -DDCMAKE_AR=/usr/bin/i686-w64-mingw32-ar \
536 -DCMAKE_RANLIB=/usr/bin/i686-w64-mingw32-ranlib {source_directory}
537 make
538
539This produces a 32-bit build of TigerVNC that does not depend on cygwin1.dll or
540other Cygwin DLL's. The mingw64-i686-gcc-core and mingw64-i686-gcc-g++
541packages (and their dependencies) must be installed.
542
543
544MinGW-w64 Build on Windows
545--------------------------
546
547This produces a 64-bit build of TigerVNC using the "native" MinGW-w64 toolchain
548(which is faster than the Cygwin version):
549
550 cd {build_directory}
551 CC={mingw-w64_binary_path}/x86_64-w64-mingw32-gcc \
552 CXX={mingw-w64_binary_path}/x86_64-w64-mingw32-g++ \
553 RC={mingw-w64_binary_path}/x86_64-w64-mingw32-windres \
554 cmake -G "MSYS Makefiles" \
555 -DCMAKE_AR={mingw-w64_binary_path}/x86_64-w64-mingw32-ar \
556 -DCMAKE_RANLIB={mingw-w64_binary_path}/x86_64-w64-mingw32-ranlib \
557 {source_directory}
558 make
559
560
561MinGW Build on Linux
562--------------------
563
564 cd {build_directory}
565 CC={mingw_binary_path}/i386-mingw32-gcc \
566 CXX={mingw_binary_path}/i386-mingw32-g++ \
567 RC={mingw_binary_path}/i386-mingw32-windres \
568 cmake -G "Unix Makefiles" -DCMAKE_SYSTEM_NAME=Windows \
569 -DCMAKE_AR={mingw_binary_path}/i386-mingw32-ar \
570 -DCMAKE_RANLIB={mingw_binary_path}/i386-mingw32-ranlib \
571 {source_directory}
572 make