blob: c2611b5e719b9427a072d87da5392b0d9dcbe554 [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/
DRC240a5ff2011-07-06 07:28:30 +000027 * See "Building High-Performance JPEG Support" below.
DRC667df922011-06-23 10:11:22 +000028
29
30=========================
31Build Requirements (Unix)
32=========================
33
34-- Non-Mac platforms:
35 * X11 development kit
36
DRC2c0ea902010-04-16 07:33:41 +000037-- If building Xvnc:
DRC667df922011-06-23 10:11:22 +000038 * autoconf 2.57 or later
39 * automake 1.7 or later
40 * libtool 1.4 or later
41 * OpenSSL v0.9.7 or later
DRC2c0ea902010-04-16 07:33:41 +000042 * Python v2.3 or later
43 * zlib v1.2 or later
DRC2c0ea902010-04-16 07:33:41 +000044
DRC69854b42011-05-13 09:31:24 +000045 * pkgconfig 0.20 or later
46 If you are using an older RPM-based system which does not meet this
47 minimum requirement (such as Red Hat Enterprise Linux 4), then you can
48 build pkgconfig 0.20 from the Fedora 5 source RPM:
49 http://archive.fedoraproject.org/pub/archive/fedora/linux/core/5/source/SRPMS/pkgconfig-0.20-2.2.1.src.rpm
50
DRC69854b42011-05-13 09:31:24 +000051 * gettext 0.14.4 or later
52 If you are using an older RPM-based system which does not meet this
53 minimum requirement (such as Red Hat Enterprise Linux 4), then you can
54 build gettext 0.14.5 from the Fedora 5 source RPM:
55 http://archive.fedoraproject.org/pub/archive/fedora/linux/core/5/source/SRPMS/gettext-0.14.5-3.src.rpm
56 NOTE: gcj and libgcj are required when building the above source RPM.
DRC2b0b1942011-02-09 03:10:44 +000057
DRC2c0ea902010-04-16 07:33:41 +000058
DRC667df922011-06-23 10:11:22 +000059============================
60Build Requirements (Windows)
61============================
DRC180c0162010-10-27 07:20:27 +000062
63-- Microsoft Visual C++ 2005 or later
64
65 If you don't already have Visual C++, then the easiest way to get it is by
66 installing the Windows SDK:
67
68 http://msdn.microsoft.com/en-us/windows/bb980924.aspx
69
70 The Windows SDK includes both 32-bit and 64-bit Visual C++ compilers and
71 everything necessary to build TigerVNC.
72
73 * For 32-bit builds, you can also use Microsoft Visual C++ Express
74 Edition. Visual C++ Express Edition is a free download.
75 * If you intend to build TigerVNC from the command line, then add the
76 appropriate compiler and SDK directories to the INCLUDE, LIB, and PATH
77 environment variables. This is generally accomplished by executing
78 vcvars32.bat or vcvars64.bat and SetEnv.cmd. vcvars32.bat and
79 vcvars64.bat are part of Visual C++ and are located in the same directory
80 as the compiler. SetEnv.cmd is part of the Windows SDK. You can pass
81 optional arguments to SetEnv.cmd to specify a 32-bit or 64-bit build
82 environment.
83
84... OR ...
85
86-- MinGW
87
DRC180c0162010-10-27 07:20:27 +000088-- Inno Setup (needed to build the TigerVNC installer)
89 Inno Setup can be downloaded from http://www.jrsoftware.org/isinfo.php.
90 You also need the Inno Setup Preprocessor, which is available in the
91 Inno Setup QuickStart Pack.
92
93 Add the directory containing iscc.exe (for instance,
94 C:\Program Files\Inno Setup 5) to the system or user PATH environment
95 variable prior to building TigerVNC.
96
DRC667df922011-06-23 10:11:22 +000097
98=============
99Building FLTK
100=============
101
102Currently, TigerVNC requires functionality that is not yet included in the
103upstream version of FLTK. Thus, it will be necessary to build FLTK from
104source. To do this:
105
1061. Download the FLTK 1.3.0 source tarball from http://www.fltk.org/
1072. Extract the source tarball
1083. cd fltk-1.3.0
1094. patch -p1 < {tigervnc_source_directory}/fltk/extensions.patch
1105. Use CMake to build FLTK using the same procedures described below for
111 building TigerVNC. The recipes in the "Build Recipes" section also apply.
1126. (optional) Use 'make install' to install FLTK into a directory of your
113 choosing.
1147. When building TigerVNC, set the FLTK_FLUID_EXECUTABLE CMake variable to the
115 location of the fluid executable that was built in Step 5 or installed in
116 Step 6. This gives CMake a hint as to where to find the FLTK library.
1178. If you did not install FLTK, then set the FLTK_INCLUDE_DIR CMake variable to
118 the location of the FLTK source directory.
DRC2b0b1942011-02-09 03:10:44 +0000119
DRC180c0162010-10-27 07:20:27 +0000120
121==================
122Out-of-Tree Builds
123==================
124
125Binary objects, libraries, and executables are generated in the same directory
126from which cmake was executed (the "binary directory"), and this directory need
127not necessarily be the same as the TigerVNC source directory. You can create
128multiple independent binary directories, in which different versions of
129TigerVNC can be built from the same source tree using different compilers or
130settings. In the sections below, {build_directory} refers to the binary
131directory, whereas {source_directory} refers to the TigerVNC source directory.
132For in-tree builds, these directories are the same.
133
134
135=================
136Building TigerVNC
137=================
138
139
DRC667df922011-06-23 10:11:22 +0000140Unix/Mac
141--------
142
143The following procedure will build the TigerVNC Viewer on Linux and Unix
144systems. On 64-bit systems, this will build a 64-bit version of TigerVNC. See
145"Build Recipes" for specific build instructions for building a 32-bit version
146of TigerVNC on 64-bit systems.
147
148 cd {build_directory}
DRC240a5ff2011-07-06 07:28:30 +0000149 cmake -G "Unix Makefiles" [additional CMake flags] {source_directory}
DRC667df922011-06-23 10:11:22 +0000150 make
151
152Building the TigerVNC Server (Xvnc) is a bit trickier. On newer systems
153containing Xorg 7.4 or later (such as Fedora), Xvnc is typically built to use
154the X11 shared libraries provided with the system. The procedure for this is
155very system-specific, since it requires specifying such things as font and X
156resource directories. Thus, it cannot be described in terms general enough for
157this document.
158
159Those using systems with older versions of Xorg must build a "legacy-friendly"
160version of the TigerVNC Server. This is accomplished by downloading and
161building the more recent Xorg modules in a local directory and then building
162Xvnc such that it links against the local build of these libraries, not the X11
163libraries installed on the system. The "build-xorg" script in the TigerVNC
164source distribution (located under unix/) automates this process.
165
166The following procedure will build both the TigerVNC Viewer and a
167"legacy-friendly" version of the TigerVNC Server:
168
169 cd {build_directory}
170 sh {source_directory}/unix/build-xorg init
171 sh {source_directory}/unix/build-xorg build [additional CMake flags]
172
173build-xorg generates a version of Xvnc that has no external dependencies on the
174X11 shared libraries or any other distribution-specific shared libraries. This
175version of Xvnc should be transportable across multiple O/S distributions.
176build-xorg should work on Red Hat Enterprise 4, its contemporaries, and later
177systems. It probably will not work on older systems. It has not been tested
178on non-Linux systems (yet).
179
180build-xorg can also be used to rebuild just the TigerVNC Server and Viewer,
181once the X11 modules and other dependencies have been built for the first time.
182This is convenient for testing changes that just apply to the TigerVNC source
183code. To accomplish this, run:
184
185 sh {source_directory}/unix/build-xorg rebuild [additional make flags]
186
187For instance,
188
189 sh {source_directory}/unix/build-xorg rebuild clean
190
191will clean both the Xvnc and vncviewer builds without destroying any of the
192build configuration or module dependencies.
193
194
DRC180c0162010-10-27 07:20:27 +0000195Visual C++ (Command Line)
196-------------------------
197
198 cd {build_directory}
DRC240a5ff2011-07-06 07:28:30 +0000199 cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release [additional CMake flags] {source_directory}
DRC180c0162010-10-27 07:20:27 +0000200 nmake
201
202This will build either a 32-bit or a 64-bit version of TigerVNC, depending
203on which version of cl.exe is in the PATH.
204
205
206Visual C++ (IDE)
207----------------
208
209Choose the appropriate CMake generator option for your version of Visual Studio
210(run "cmake" with no arguments for a list of available generators.) For
211instance:
212
213 cd {build_directory}
DRC240a5ff2011-07-06 07:28:30 +0000214 cmake -G "Visual Studio 9 2008" [additional CMake flags] {source_directory}
DRC180c0162010-10-27 07:20:27 +0000215
216You can then open ALL_BUILD.vcproj in Visual Studio and build one of the
217configurations in that project ("Debug", "Release", etc.) to generate a full
218build of TigerVNC.
219
220
221MinGW
222-----
223
224 cd {build_directory}
DRC240a5ff2011-07-06 07:28:30 +0000225 cmake -G "MSYS Makefiles" [additional CMake flags] {source_directory}
DRC180c0162010-10-27 07:20:27 +0000226 make
227
228This will generate only vncviewer. Currently, Visual C++ must be used to build
229WinVNC.
230
231
232Debug Build
233-----------
234
Adam Tkacf586b842011-04-27 11:20:18 +0000235Add "-DCMAKE_BUILD_TYPE=Debug" to the CMake command line. Or, if building with
DRC180c0162010-10-27 07:20:27 +0000236NMake, remove "-DCMAKE_BUILD_TYPE=Release" (Debug builds are the default with
237NMake.)
238
239
DRC8290dd62011-02-10 22:54:36 +0000240Self-Contained MinGW Build
241--------------------------
242
243If TigerVNC is built using MinGW, then it may depend on the MinGW libgcc DLL.
244To eliminate this dependency, add
245
246 -DCMAKE_C_FLAGS=-static-libgcc -DCMAKE_CXX_FLAGS=-static-libgcc
247
Adam Tkacf586b842011-04-27 11:20:18 +0000248to the CMake command line.
DRC8290dd62011-02-10 22:54:36 +0000249
250
DRCce355e32011-06-24 04:58:01 +0000251======================================
DRC240a5ff2011-07-06 07:28:30 +0000252Building High-Performance JPEG Support
253======================================
254
255In order to achieve its high levels of performance, TigerVNC relies on
256libjpeg-turbo (http://www.libjpeg-turbo.org), a derivative of libjpeg which
257uses SIMD instructions to accelerate baseline JPEG compression and
258decompression. If you are building TigerVNC on an operating system that
259includes libjpeg-turbo as a system library (for instance, Fedora 14 and later),
260then the TigerVNC build system should detect the system version of
261libjpeg-turbo automatically and link against it. However, this produces a
262version of TigerVNC that depends on the libjpeg-turbo dynamic libraries, and
263thus the TigerVNC binaries are not portable.
264
265To build a fully portable, cross-compatible version of TigerVNC with
266high-performance JPEG support, it is necessary to link against the
267libjpeg-turbo static library. This is also necessary when building TigerVNC on
268Windows or OS X. To link against the libjpeg-turbo static library, first
269install the libjpeg-turbo SDK, which is available from
270https://sourceforge.net/projects/libjpeg-turbo/files/. Next, use the
271JPEG_INCLUDE_DIR and JPEG_LIBRARY CMake variables to specify the location of
272libjpeg-turbo. For example, adding
273
274 -DJPEG_INCLUDE_DIR=/opt/libjpeg-turbo/include \
275 -DJPEG_LIBRARY=/opt/libjpeg-turbo/lib/libjpeg.a
276
277to the CMake command line will link TigerVNC against a static version of
278libjpeg-turbo installed under /opt/TigerVNC (which is the normal install
279location for the libjpeg-turbo SDK on Unix and Linux platforms.) Replace "lib"
280with "lib32" or "lib64" to use the 32-bit or 64-bit version of the library on
28164-bit Linux platforms.
282
283Adding
284
285 -DJPEG_INCLUDE_DIR=c:\libjpeg-turbo[64]\include \
286 -DJPEG_LIBRARY=c:\libjpeg-turbo[64]\lib\jpeg-static.lib
287
288to the CMake command line will link TigerVNC against the static version of
289libjpeg-turbo provided by the libjpeg-turbo SDK for Visual C++.
290
291Adding
292
293 -DJPEG_INCLUDE_DIR=/c/libjpeg-turbo-gcc[64]/include \
294 -DJPEG_LIBRARY=/c/libjpeg-turbo-gcc[64]/lib/libjpeg.a
295
296to the CMake command line will link TigerVNC against the static version of
297libjpeg-turbo provided by the libjpeg-turbo SDK for GCC (MinGW.)
298
299CMake will report:
300
301 Performing Test FOUND_LIBJPEG_TURBO - Success
302
303if it successfully finds libjpeg-turbo.
304
305
306======================================
DRCce355e32011-06-24 04:58:01 +0000307Building Native Language Support (NLS)
308======================================
309
310NLS requires gettext, which is supplied with most Linux distributions but not
311with most other operating systems. Building gettext from source is
312straightforward on Mac and other Unix variants, but on Windows it requires
313MinGW. Thus, it is not possible to enable NLS when building TigerVNC with
314Visual C++.
315
316You can override the ICONV_LIBRARIES and LIBINTL_LIBRARY CMake variables to
317specify the locations of libiconv and libintl, respectively. For instance,
318adding
319
320 -DLIBINTL_LIBRARY=/opt/gettext/lib/libintl.a
321
322to the CMake command line would link TigerVNC against a static version of
323libintl located under /opt/gettext. Adding
324
325 -DICONV_INCLUDE_DIR=/mingw/include \
326 -DICONV_LIBRARIES=/mingw/lib/libiconv.a \
327 -DGETTEXT_INCLUDE_DIR=/mingw/include \
328 -DLIBINTL_LIBRARY=/mingw/lib/libintl.a
329
330to the CMake command line would link TigerVNC against the static versions of
331libiconv and libintl included in the MinGW Developer Toolkit.
332
333
334===============================================
335Building Transport Layer Security (TLS) support
336===============================================
DRC8290dd62011-02-10 22:54:36 +0000337
Adam Tkac445d4ed2011-04-27 11:04:01 +0000338VeNCrypt (the TigerVNC security and authentication extensions) can be built
339with TLS support, which provides built-in encryption for VNC sessions. This
DRCce355e32011-06-24 04:58:01 +0000340requires GnuTLS, which is readily available in many Linux distributions but not
341as readily available in binary form on other types of systems. This section
DRC667df922011-06-23 10:11:22 +0000342describes the issues associated with building a version of TigerVNC with TLS
343support and how to work around those issues.
Adam Tkacf586b842011-04-27 11:20:18 +0000344
DRC667df922011-06-23 10:11:22 +0000345
346Unix/Mac
347--------
348
349In general, if you are building on a Unix-ish platform that has the GnuTLS
350libraries and include files installed in the standard system locations, then
351the TigerVNC build system should detect the system version of GnuTLS
352automatically and link against it. However, this produces a version of
353TigerVNC that depends on the GnuTLS dynamic libraries, and thus the TigerVNC
354binaries are not portable.
355
DRCce355e32011-06-24 04:58:01 +0000356To build a fully portable, cross-compatible version of TigerVNC with TLS
DRC667df922011-06-23 10:11:22 +0000357support, it is necessary to link against the GnuTLS static library (as well
358as the static libraries of its dependencies.) If you are lucky enough, then
359your O/S distribution may include pre-packaged versions of these static
360libraries. Otherwise, it will be necessary to build GnuTLS, libgcrypt,
361libtasn1, and libgpg-error from source.
362
363You can manipulate the GNUTLS_INCLUDE_DIR and GNUTLS_LIBRARY CMake variables to
DRCce355e32011-06-24 04:58:01 +0000364build TigerVNC against a custom build of GnuTLS that is installed in a
365non-system directory. For instance, adding
DRC667df922011-06-23 10:11:22 +0000366
367 -DGNUTLS_INCLUDE_DIR=/opt/gnutls/include \
368 -DGNUTLS_LIBRARY='/opt/gnutls/lib/libgnutls.a;/opt/gnutls/lib/libgcrypt.a;/opt/gnutls/lib/libgpg-error.a;/opt/gnutls/lib/libtasn1.a' \
369 -DUSE_INCLUDED_ZLIB=1
370
371to the CMake or 'build-xorg build' command line will cause TigerVNC to be
372statically linked against a custom installation of GnuTLS that resides under
DRCce355e32011-06-24 04:58:01 +0000373/opt/gnutls. GnuTLS depends on zlib, so specifying -DUSE_INCLUDED_ZLIB=1 will
DRC667df922011-06-23 10:11:22 +0000374satisfy that dependency using TigerVNC's in-tree version of zlib, which
375prevents TigerVNC from depending on the libz dynamic library.
376
377
378MinGW
379-----
DRC8290dd62011-02-10 22:54:36 +0000380
381An installer containing the GnuTLS header files, as well as static and dynamic
Adam Tkacf586b842011-04-27 11:20:18 +0000382link libraries for 32-bit MinGW, can be downloaded from the following site:
DRC8290dd62011-02-10 22:54:36 +0000383
384http://josefsson.org/gnutls4win/
385
Adam Tkacf586b842011-04-27 11:20:18 +0000386As of this writing, GnuTLS cannot be built cleanly with MinGW64 due to the fact
387that portions of the code assume an LP64 data model (Windows uses LLP64.)
388Thus, it is not possible at this time to produce a Win64 version of TigerVNC
389with TLS support.
DRC8290dd62011-02-10 22:54:36 +0000390
Adam Tkacf586b842011-04-27 11:20:18 +0000391Whether you use the above installer or build GnuTLS from source, make sure that
392you install the libraries and headers into a pathname that doesn't contain
393spaces (the installer will try to install under c:\Program Files unless you
394tell it otherwise.) If the GnuTLS include path contains spaces, then the MinGW
395resource compiler will barf when you try to build TigerVNC.
396
397You can manipulate the GNUTLS_INCLUDE_DIR and GNUTLS_LIBRARY CMake variables to
DRC8290dd62011-02-10 22:54:36 +0000398specify the directory under which you installed GnuTLS. For instance, adding
399
400 -DGNUTLS_INCLUDE_DIR=/c/gnutls/include \
Adam Tkacf586b842011-04-27 11:20:18 +0000401 -DGNUTLS_LIBRARY=/c/gnutls/lib/libgnutls.dll.a
402
403to the CMake command line when using MinGW will cause TigerVNC to be linked
404against GnuTLS DLLs that are installed under c:\gnutls.
405
406Adding
407
408 -DGNUTLS_INCLUDE_DIR=/c/gnutls/include \
DRC8290dd62011-02-10 22:54:36 +0000409 -DGNUTLS_LIBRARY='/c/gnutls/lib/libgnutls.a;/c/gnutls/lib/libgcrypt.a;/c/gnutls/lib/libtasn1.a;/c/gnutls/lib/libgpg-error.a'
410
Adam Tkacf586b842011-04-27 11:20:18 +0000411to the CMake command line will cause TigerVNC to be statically linked against
412GnuTLS libraries that are installed under c:\gnutls.
413
414Note that the use of MinGW means that only the TigerVNC viewer can be built,
415not the server.
416
DRC667df922011-06-23 10:11:22 +0000417
Adam Tkacf586b842011-04-27 11:20:18 +0000418Visual C++
419----------
420
421There is generally no sane way to build GnuTLS and its dependencies using
422Visual C++. Thus, it is necessary to either build the libraries with MinGW (or
423download 32-bit versions of these from the link above), generate Visual C++
424import libraries from the DLLs, then link TigerVNC against the Visual C++
425import libraries.
426
427In the instructions below, {gnutls_path} indicates the path under which GnuTLS
428is installed (Example: c:\Program Files\GnuTLS-2.10.1).
429
430To generate Visual C++ import libraries:
431
432cd {gnutls_path}\lib
433lib /def:..\bin\libgnutls-{version}.def /out:libgnutls.lib
434
435Now, you can add the following arguments to the CMake command line:
436
437 -DGNUTLS_INCLUDE_DIR={gnutls_path}\include \
438 -DGNUTLS_LIBRARY={gnutls_path}\lib\libgnutls.lib
439
440to build TigerVNC against the GnuTLS DLLs installed under {gnutls_path}.
DRC8290dd62011-02-10 22:54:36 +0000441
442
DRC180c0162010-10-27 07:20:27 +0000443===================
444Installing TigerVNC
445===================
446
447You can use the build system to install TigerVNC into a directory of your
DRC667df922011-06-23 10:11:22 +0000448choosing. To do this, add:
DRC180c0162010-10-27 07:20:27 +0000449
450 -DCMAKE_INSTALL_PREFIX={install_directory}
451
DRC667df922011-06-23 10:11:22 +0000452to the CMake command line. Then, after building TigerVNC, you can run
453'make install' or 'nmake install' (or build the "install" target in the Visual
454Studio IDE) to install it.
DRC180c0162010-10-27 07:20:27 +0000455
456If you don't specify CMAKE_INSTALL_PREFIX, then the default is
DRC667df922011-06-23 10:11:22 +0000457c:\Program Files\TigerVNC on Windows and /usr/local on Unix.
DRC180c0162010-10-27 07:20:27 +0000458
459
DRC667df922011-06-23 10:11:22 +0000460=========================
461Creating Release Packages
462=========================
463
464The following commands can be used to create various types of release packages:
465
466
467Unix
468----
469
DRC667df922011-06-23 10:11:22 +0000470make tarball
471
472 Create a binary tarball containing the TigerVNC Viewer
473
474make servertarball
475
476 Create a binary tarball containing both the TigerVNC Server and Viewer
477
478make dmg
479
DRCaab38302011-06-25 20:24:02 +0000480 Create Macintosh disk image file that contains an application bundle of the
481 TigerVNC Viewer
DRC667df922011-06-23 10:11:22 +0000482
DRCaab38302011-06-25 20:24:02 +0000483make udmg
DRC667df922011-06-23 10:11:22 +0000484
485 On 64-bit OS X systems, this creates a version of the Macintosh package and
486 disk image which contains universal i386/x86-64 binaries. You should first
487 configure a 32-bit out-of-tree build of TigerVNC, then configure a 64-bit
488 out-of-tree build, then run 'make udmg' from the 64-bit build directory. The
489 build system will look for the 32-bit build under {source_directory}/osxx86
DRCaab38302011-06-25 20:24:02 +0000490 by default, but you can override this by setting the OSX_X86_BUILD CMake
491 variable to the directory containing your configured 32-bit build. Either
492 the 64-bit or 32-bit build can be configured to be backward compatible by
493 using the instructions in the "Build Recipes" section.
DRC667df922011-06-23 10:11:22 +0000494
495
496Windows
497-------
498
499If using NMake:
500
501 cd {build_directory}
502 nmake installer
503
504If using MinGW:
505
506 cd {build_directory}
507 make installer
508
509If using the Visual Studio IDE, build the "installer" project.
510
511The installer package (TigerVNC[64].exe) will be located under
512{build_directory}. If building using the Visual Studio IDE, then the installer
513package will be located in a subdirectory with the same name as the
514configuration you built (such as {build_directory}\Debug\ or
515{build_directory}\Release\).
516
517NOTE: If TigerVNC is built with TLS support, then the build system will
518attempt to package the GnuTLS DLLs into the Windows installer. It looks for
519these DLLs in a directory called "bin" one level up from GNUTLS_INCLUDE_DIR.
520
521
522=============
523Build Recipes
524=============
525
526
52732-bit Build on 64-bit Linux/Unix (including OS X)
528--------------------------------------------------
529
530Set the following environment variables before running CMake or
531'build-xorg build':
532
533 CFLAGS='-O3 -m32'
534 CXXFLAGS='-O3 -m32'
535 LDFLAGS=-m32
536
537
53864-bit Backward-Compatible Build on 64-bit OS X
539-----------------------------------------------
540
541Add
542
543 -DCMAKE_OSX_SYSROOT=/Developer/SDKs/MacOSX10.5.sdk \
544 -DCMAKE_OSX_DEPLOYMENT_TARGET=10.5
545
546to the CMake command line. The OS X 10.5 SDK must be installed.
547
548
54932-bit Backward-Compatible Build on 64-bit OS X
550-----------------------------------------------
551
552Set the following environment variables:
553
554 CC=gcc-4.0
555 CXX=g++-4.0
556 CFLAGS='-O3 -m32'
557 CXXFLAGS='-O3 -m32'
558 LDFLAGS=-m32
559
560and add
561
562 -DCMAKE_OSX_SYSROOT=/Developer/SDKs/MacOSX10.4u.sdk \
563 -DCMAKE_OSX_DEPLOYMENT_TARGET=10.4
564
565to the CMake command line. The OS X 10.4 SDK must be installed.
DRC180c0162010-10-27 07:20:27 +0000566
567
56864-bit MinGW Build on Cygwin
569----------------------------
570
571 cd {build_directory}
572 CC=/usr/bin/x86_64-w64-mingw32-gcc CXX=/usr/bin/x86_64-w64-mingw32-g++ \
573 RC=/usr/bin/x86_64-w64-mingw32-windres \
574 cmake -G "Unix Makefiles" -DCMAKE_SYSTEM_NAME=Windows \
575 -DCMAKE_AR=/usr/bin/x86_64-w64-mingw32-ar \
576 -DCMAKE_RANLIB=/usr/bin/x86_64-w64-mingw32-ranlib {source_directory}
577 make
578
579This produces a 64-bit build of TigerVNC that does not depend on cygwin1.dll or
580other Cygwin DLL's. The mingw64-x86_64-gcc-core and mingw64-x86_64-gcc-g++
581packages (and their dependencies) must be installed.
582
583
58432-bit MinGW Build on Cygwin
585----------------------------
586
587 cd {build_directory}
588 CC=/usr/bin/i686-w64-mingw32-gcc CXX=/usr/bin/i686-w64-mingw32-g++ \
589 RC=/usr/bin/i686-w64-mingw32-windres \
590 cmake -G "Unix Makefiles" -DCMAKE_SYSTEM_NAME=Windows \
591 -DDCMAKE_AR=/usr/bin/i686-w64-mingw32-ar \
592 -DCMAKE_RANLIB=/usr/bin/i686-w64-mingw32-ranlib {source_directory}
593 make
594
595This produces a 32-bit build of TigerVNC that does not depend on cygwin1.dll or
596other Cygwin DLL's. The mingw64-i686-gcc-core and mingw64-i686-gcc-g++
597packages (and their dependencies) must be installed.
598
599
600MinGW-w64 Build on Windows
601--------------------------
602
603This produces a 64-bit build of TigerVNC using the "native" MinGW-w64 toolchain
604(which is faster than the Cygwin version):
605
606 cd {build_directory}
607 CC={mingw-w64_binary_path}/x86_64-w64-mingw32-gcc \
608 CXX={mingw-w64_binary_path}/x86_64-w64-mingw32-g++ \
609 RC={mingw-w64_binary_path}/x86_64-w64-mingw32-windres \
610 cmake -G "MSYS Makefiles" \
611 -DCMAKE_AR={mingw-w64_binary_path}/x86_64-w64-mingw32-ar \
612 -DCMAKE_RANLIB={mingw-w64_binary_path}/x86_64-w64-mingw32-ranlib \
613 {source_directory}
614 make
615
616
617MinGW Build on Linux
618--------------------
619
620 cd {build_directory}
621 CC={mingw_binary_path}/i386-mingw32-gcc \
622 CXX={mingw_binary_path}/i386-mingw32-g++ \
623 RC={mingw_binary_path}/i386-mingw32-windres \
624 cmake -G "Unix Makefiles" -DCMAKE_SYSTEM_NAME=Windows \
625 -DCMAKE_AR={mingw_binary_path}/i386-mingw32-ar \
626 -DCMAKE_RANLIB={mingw_binary_path}/i386-mingw32-ranlib \
627 {source_directory}
628 make