You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

BUILDING.txt 24KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664
  1. *******************************************************************************
  2. ** Building TigerVNC
  3. *******************************************************************************
  4. ================================
  5. Build Requirements (All Systems)
  6. ================================
  7. -- CMake (http://www.cmake.org) v2.8 or later
  8. -- FLTK 1.3.2
  9. * Must be a patched snapshot to get full functionality
  10. * See "Building FLTK" below.
  11. -- If building TLS support:
  12. * GnuTLS and its dependencies (libgcrypt, libtasn1, libgpg-error)
  13. -- If building native language support (NLS):
  14. * Gnu gettext 0.14.4 or later
  15. * See "Building Native Language Support" below.
  16. -- libjpeg-turbo SDK
  17. * If your system does not include libjpeg-turbo, then you can download the
  18. SDK from http://sourceforge.net/projects/libjpeg-turbo/files/
  19. * See "Building High-Performance JPEG Support" below.
  20. =========================
  21. Build Requirements (Unix)
  22. =========================
  23. -- Non-Mac platforms:
  24. * X11 development kit
  25. -- If building Xvnc:
  26. * autoconf 2.57 or later
  27. * automake 1.7 or later
  28. * libtool 1.4 or later
  29. * OpenSSL v0.9.7 or later
  30. * Python v2.3 or later
  31. * zlib v1.2 or later
  32. * pkgconfig 0.20 or later
  33. If you are using an older RPM-based system which does not meet this
  34. minimum requirement (such as Red Hat Enterprise Linux 4), then you can
  35. build pkgconfig 0.20 from the Fedora 5 source RPM:
  36. http://archive.fedoraproject.org/pub/archive/fedora/linux/core/5/source/SRPMS/pkgconfig-0.20-2.2.1.src.rpm
  37. * gettext 0.14.4 or later
  38. If you are using an older RPM-based system which does not meet this
  39. minimum requirement (such as Red Hat Enterprise Linux 4), then you can
  40. build gettext 0.14.5 from the Fedora 5 source RPM:
  41. http://archive.fedoraproject.org/pub/archive/fedora/linux/core/5/source/SRPMS/gettext-0.14.5-3.src.rpm
  42. NOTE: gcj and libgcj are required when building the above source RPM.
  43. ============================
  44. Build Requirements (Windows)
  45. ============================
  46. -- MinGW or MinGW-w64
  47. -- Inno Setup (needed to build the TigerVNC installer)
  48. Inno Setup can be downloaded from http://www.jrsoftware.org/isinfo.php.
  49. You also need the Inno Setup Preprocessor, which is available in the
  50. Inno Setup QuickStart Pack.
  51. Add the directory containing iscc.exe (for instance,
  52. C:\Program Files\Inno Setup 5) to the system or user PATH environment
  53. variable prior to building TigerVNC.
  54. =========================
  55. Build Requirements (Java)
  56. =========================
  57. -- Sun/Oracle JDK v5 or later or OpenJDK
  58. -- See "Building Java Support" below.
  59. =============
  60. Building FLTK
  61. =============
  62. TigerVNC requires FLTK 1.3.0 (or later). Although it will build and work
  63. with plain 1.3.0, to get full functionality and the best behaviour you
  64. need to build a patched version:
  65. 1. Check out FLTK 1.3.2 using Subversion:
  66. $ svn co http://svn.easysw.com/public/fltk/fltk/tags/release-1.3.2 fltk-1.3.2
  67. 2. For full functionality, apply patches. Here's a shell script to do
  68. that:
  69. #!/bin/bash
  70. set -e
  71. apply_patch()
  72. {
  73. rm -f $2
  74. wget http://www.fltk.org/strfiles/$1/$2
  75. patch -p1 < $2
  76. }
  77. # Export dead key information from FLTK to the apps
  78. # http://www.fltk.org/str.php?L2599
  79. apply_patch 2599 fltk-1_v4.3.x-keyboard-x11.patch
  80. apply_patch 2599 fltk-1_v4.3.x-keyboard-win32.patch
  81. apply_patch 2599 fltk-1_v6.3.x-keyboard-osx.patch
  82. # Notify applications of changes to the clipboard
  83. # http://www.fltk.org/str.php?L2636
  84. apply_patch 2636 fltk-1.3.x-clipboard.patch
  85. apply_patch 2636 fltk-1_v5.3.x-clipboard-x11.patch
  86. apply_patch 2636 fltk-1_v3.3.x-clipboard-win32-fix.patch
  87. apply_patch 2636 fltk-1_v2.3.x-clipboard-win32.patch
  88. apply_patch 2636 fltk-1_v2.3.x-clipboard-osx.patch
  89. # Ability to convert a Fl_Pixmap to a Fl_RGB_Image
  90. # http://www.fltk.org/str.php?L2659
  91. apply_patch 2659 pixmap_v2.patch
  92. # Support for custom cursors
  93. # http://www.fltk.org/str.php?L2660
  94. apply_patch 2660 fltk-1_v5.3.x-cursor.patch
  95. # Improve modality interaction with WM
  96. # http://www.fltk.org/str.php?L2802
  97. apply_patch 2802 fltk-1_v2.3.0-modal.patch
  98. # Window icons
  99. # http://www.fltk.org/str.php?L2816
  100. apply_patch 2816 fltk-1_v3.3.0-icons.patch
  101. # Multihead
  102. # http://fltk.org/str.php?L2860
  103. apply_patch 2860 fltk-1.3.x-screen_num.patch
  104. apply_patch 2860 fltk-1_v3.3.x-multihead.patch
  105. 3. Use CMake to build FLTK using the same procedures described below for
  106. building TigerVNC. The recipes in the "Build Recipes" section also apply.
  107. If you want optimized code, make sure to build with
  108. -DCMAKE_BUILD_TYPE=Release.
  109. 4. (optional) Use 'make install' to install FLTK into a directory of your
  110. choosing.
  111. 5. When building TigerVNC, set the FLTK_FLUID_EXECUTABLE CMake variable to the
  112. location of the fluid executable that was built in Step 3 or installed in
  113. Step 4. This gives CMake a hint as to where to find the FLTK library.
  114. 6. If you did not install FLTK, then set the FLTK_INCLUDE_DIR CMake variable to
  115. the location of the FLTK source directory.
  116. ==================
  117. Out-of-Tree Builds
  118. ==================
  119. Binary objects, libraries, and executables are generated in the same directory
  120. from which cmake was executed (the "binary directory"), and this directory need
  121. not necessarily be the same as the TigerVNC source directory. You can create
  122. multiple independent binary directories, in which different versions of
  123. TigerVNC can be built from the same source tree using different compilers or
  124. settings. In the sections below, {build_directory} refers to the binary
  125. directory, whereas {source_directory} refers to the TigerVNC source directory.
  126. For in-tree builds, these directories are the same.
  127. =================
  128. Building TigerVNC
  129. =================
  130. Building the TigerVNC Viewer on Unix/Mac Systems
  131. ------------------------------------------------
  132. The following procedure will build the TigerVNC Viewer on Linux and Unix
  133. systems. On 64-bit systems, this will build a 64-bit version of TigerVNC. See
  134. "Build Recipes" for specific build instructions for building a 32-bit version
  135. of TigerVNC on 64-bit systems.
  136. cd {build_directory}
  137. cmake -G "Unix Makefiles" [additional CMake flags] {source_directory}
  138. make
  139. Building the TigerVNC Server on Modern Unix/Linux Systems
  140. ---------------------------------------------------------
  141. Building the TigerVNC Server (Xvnc) is a bit trickier. On newer systems
  142. containing Xorg 7.4 or later (such as Fedora), Xvnc is typically built to use
  143. the X11 shared libraries provided with the system. The procedure for this is
  144. system-specific, since it requires specifying such things as font directories,
  145. but the general outline is as follows (this procedure assumes that the viewer
  146. has already been built, per above.)
  147. > cd {build_directory}
  148. If performing an out-of-tree build:
  149. > mkdir unix
  150. > cp -R {source_directory}/unix/xserver unix/
  151. > cp -R {xorg_source}/* unix/xserver/
  152. (NOTE: {xorg_source} is the directory containing the Xorg source for the
  153. machine on which you are building TigerVNC. The most recent versions of
  154. Red Hat/CentOS/Fedora, for instance, provide an RPM called
  155. "xorg-x11-server-source", which installs the Xorg source under
  156. /usr/share/xorg-x11-server-source.)
  157. > cd unix/xserver/
  158. > patch -p1 < {source_directory}/unix/xserver{version}.patch
  159. (where {version} matches the X server version you are building, such as
  160. "17" for version 1.7.x.)
  161. > autoreconf -fiv
  162. > ./configure --with-pic --without-dtrace --disable-static --disable-dri \
  163. --disable-xinerama --disable-xvfb --disable-xnest --disable-xorg \
  164. --disable-dmx --disable-xwin --disable-xephyr --disable-kdrive \
  165. --disable-config-dbus --disable-config-hal --disable-config-udev \
  166. --disable-dri2 --enable-install-libxf86config --enable-glx \
  167. --with-default-font-path="catalogue:/etc/X11/fontpath.d,built-ins" \
  168. --with-fontdir=/usr/share/X11/fonts \
  169. --with-xkb-path=/usr/share/X11/xkb \
  170. --with-xkb-output=/var/lib/xkb \
  171. --with-xkb-bin-directory=/usr/bin \
  172. --with-serverconfig-path=/usr/lib[64]/xorg \
  173. --with-dri-driver-path=/usr/lib[64]/dri \
  174. {additional configure options}
  175. (NOTE: This is merely an example that works with Red Hat Enterprise/CentOS
  176. 6 and recent Fedora releases. You should customize it for your particular
  177. system. In particular, it will be necessary to customize the font, XKB,
  178. and DRI directories.)
  179. > make TIGERVNC_SRCDIR={source_directory}
  180. Building the TigerVNC Server on Legacy Unix/Linux Systems
  181. ---------------------------------------------------------
  182. Those using systems with older versions of Xorg must build a "legacy-friendly"
  183. version of the TigerVNC Server. This is accomplished by downloading and
  184. building the more recent Xorg modules in a local directory and then building
  185. Xvnc such that it links against the local build of these libraries, not the X11
  186. libraries installed on the system. The "build-xorg" script in the TigerVNC
  187. source distribution (located under unix/) automates this process.
  188. The following procedure will build both the TigerVNC Viewer and a
  189. "legacy-friendly" version of the TigerVNC Server:
  190. cd {build_directory}
  191. sh {source_directory}/unix/build-xorg init
  192. sh {source_directory}/unix/build-xorg build [additional CMake flags]
  193. build-xorg generates a version of Xvnc that has no external dependencies on the
  194. X11 shared libraries or any other distribution-specific shared libraries. This
  195. version of Xvnc should be transportable across multiple O/S distributions.
  196. build-xorg should work on Red Hat Enterprise 4, its contemporaries, and later
  197. systems. It probably will not work on older systems. It has not been tested
  198. on non-Linux systems (yet).
  199. build-xorg can also be used to rebuild just the TigerVNC Server and Viewer,
  200. once the X11 modules and other dependencies have been built for the first time.
  201. This is convenient for testing changes that just apply to the TigerVNC source
  202. code. To accomplish this, run:
  203. sh {source_directory}/unix/build-xorg rebuild [additional make flags]
  204. For instance,
  205. sh {source_directory}/unix/build-xorg rebuild clean
  206. will clean both the Xvnc and vncviewer builds without destroying any of the
  207. build configuration or module dependencies.
  208. Building the Windows TigerVNC Viewer with MinGW
  209. -----------------------------------------------
  210. If building the Windows version of TigerVNC on a Windows build system, use
  211. the following procedure.
  212. cd {build_directory}
  213. cmake -G "MSYS Makefiles" [additional CMake flags] {source_directory}
  214. make
  215. If cross-compiling on a Unix/Linux system, then see the "Build Recipes" section
  216. below.
  217. Debug Build
  218. -----------
  219. Add "-DCMAKE_BUILD_TYPE=Debug" to the CMake command line.
  220. Self-Contained GCC Build
  221. ------------------------
  222. If TigerVNC is built using GCC (including MinGW), then it may depend on the
  223. libgcc or libstdc++ dynamic libraries. To eliminate this dependency, add
  224. -DBUILD_STATIC=1
  225. to the CMake command line.
  226. ======================================
  227. Building High-Performance JPEG Support
  228. ======================================
  229. In order to achieve its high levels of performance, TigerVNC relies on
  230. libjpeg-turbo (http://www.libjpeg-turbo.org), a derivative of libjpeg which
  231. uses SIMD instructions to accelerate baseline JPEG compression and
  232. decompression. If you are building TigerVNC on an operating system that
  233. includes libjpeg-turbo as a system library (for instance, Fedora 14 and later),
  234. then the TigerVNC build system should detect the system version of
  235. libjpeg-turbo automatically and link against it. However, this produces a
  236. version of TigerVNC that depends on the libjpeg-turbo dynamic libraries, and
  237. thus the TigerVNC binaries are not portable.
  238. To build a fully portable, cross-compatible version of TigerVNC with
  239. high-performance JPEG support, it is necessary to link against the
  240. libjpeg-turbo static library. This is also necessary when building the
  241. Windows or OS X versions of TigerVNC. To link against the libjpeg-turbo static
  242. library, first install the libjpeg-turbo SDK, which is available from
  243. https://sourceforge.net/projects/libjpeg-turbo/files/. Next, use the
  244. JPEG_INCLUDE_DIR and JPEG_LIBRARY CMake variables to specify the location of
  245. libjpeg-turbo. For example, adding
  246. -DJPEG_INCLUDE_DIR=/opt/libjpeg-turbo/include \
  247. -DJPEG_LIBRARY=/opt/libjpeg-turbo/lib/libjpeg.a
  248. to the CMake command line will link TigerVNC against a static version of
  249. libjpeg-turbo installed under /opt/TigerVNC (which is the normal install
  250. location for the libjpeg-turbo SDK on Unix and Linux platforms.) Replace "lib"
  251. with "lib32" or "lib64" to use the 32-bit or 64-bit version of the library on
  252. 64-bit Linux platforms.
  253. When building on Windows systems, adding
  254. -DJPEG_INCLUDE_DIR=/c/libjpeg-turbo-gcc[64]/include \
  255. -DJPEG_LIBRARY=/c/libjpeg-turbo-gcc[64]/lib/libjpeg.a
  256. to the CMake command line will link TigerVNC against the static version of
  257. libjpeg-turbo provided by the libjpeg-turbo SDK for GCC (MinGW.)
  258. CMake will report:
  259. Performing Test FOUND_LIBJPEG_TURBO - Success
  260. if it successfully finds libjpeg-turbo.
  261. =====================
  262. Building Java Support
  263. =====================
  264. TigerVNC includes a Java version of the TigerVNC Viewer, which can be used on
  265. any platform that has a Java Runtime Environment (JRE) installed. The Java
  266. viewer works similarly to the native viewer, but with lower performance.
  267. To build the Java TigerVNC Viewer, add
  268. -DBUILD_JAVA=1
  269. to the CMake or build-xorg command line. The build system will attempt to find
  270. an installed Java Development Kit (JDK) and determine the appropriate paths for
  271. the Java compiler (javac) and the JAR creation utility (jar). You can override
  272. these paths by setting the Java_JAVAC_EXECUTABLE and Java_JAR_EXECUTABLE CMake
  273. variables. You can also override the default flags that are passed to javac
  274. by setting the JAVACFLAGS CMake variable. The build system will look for
  275. keytool and jarsigner in the same directory as Java_JAR_EXECUTABLE. These
  276. tools are needed to sign the JAR file, which is necessary to enable certain
  277. functionality (such as clipboard transfers) when the Java viewer is used as an
  278. applet.
  279. If the Java viewer is built along with the Windows TigerVNC Server (WinVNC),
  280. then the build system will embed the Java viewer into WinVNC4.exe so that it
  281. will automatically be served up using WinVNC's built-in HTTP server.
  282. Similarly, if the Java viewer is built along with the Unix TigerVNC Server
  283. (Xvnc), then the build system will include the Java viewer in the server
  284. tarball.
  285. ======================================
  286. Building Native Language Support (NLS)
  287. ======================================
  288. NLS requires gettext, which is supplied with most Linux distributions and
  289. with MinGW for Windows and which can easily be built from source on OS X and
  290. other Unix variants.
  291. You can override the ICONV_LIBRARIES and LIBINTL_LIBRARY CMake variables to
  292. specify the locations of libiconv and libintl, respectively. For instance,
  293. adding
  294. -DLIBINTL_LIBRARY=/opt/gettext/lib/libintl.a
  295. to the CMake command line would link TigerVNC against a static version of
  296. libintl located under /opt/gettext. Adding
  297. -DICONV_INCLUDE_DIR=/mingw/include \
  298. -DICONV_LIBRARIES=/mingw/lib/libiconv.a \
  299. -DGETTEXT_INCLUDE_DIR=/mingw/include \
  300. -DLIBINTL_LIBRARY=/mingw/lib/libintl.a
  301. to the CMake command line would link TigerVNC against the static versions of
  302. libiconv and libintl included in the MinGW Developer Toolkit.
  303. ===============================================
  304. Building Transport Layer Security (TLS) support
  305. ===============================================
  306. VeNCrypt (the TigerVNC security and authentication extensions) can be built
  307. with TLS support, which provides built-in encryption for VNC sessions. This
  308. requires GnuTLS, which is readily available in many Linux distributions but not
  309. as readily available in binary form on other types of systems. This section
  310. describes the issues associated with building a version of TigerVNC with TLS
  311. support and how to work around those issues.
  312. Unix/Mac
  313. --------
  314. In general, if you are building on a Unix-ish platform that has the GnuTLS
  315. libraries and include files installed in the standard system locations, then
  316. the TigerVNC build system should detect the system version of GnuTLS
  317. automatically and link against it. However, this produces a version of
  318. TigerVNC that depends on the GnuTLS dynamic libraries, and thus the TigerVNC
  319. binaries are not portable.
  320. To build a fully portable, cross-compatible version of TigerVNC with TLS
  321. support, it is necessary to link against the GnuTLS static library (as well
  322. as the static libraries of its dependencies.) If you are lucky enough, then
  323. your O/S distribution may include pre-packaged versions of these static
  324. libraries. Otherwise, it will be necessary to build GnuTLS, libgcrypt,
  325. libtasn1, and libgpg-error from source.
  326. You can manipulate the GNUTLS_INCLUDE_DIR and GNUTLS_LIBRARY CMake variables to
  327. build TigerVNC against a custom build of GnuTLS that is installed in a
  328. non-system directory. For instance, adding
  329. -DGNUTLS_INCLUDE_DIR=/opt/gnutls/include \
  330. -DGNUTLS_LIBRARY='/opt/gnutls/lib/libgnutls.a;/opt/gnutls/lib/libgcrypt.a;/opt/gnutls/lib/libgpg-error.a;/opt/gnutls/lib/libtasn1.a' \
  331. -DUSE_INCLUDED_ZLIB=1
  332. to the CMake or 'build-xorg build' command line will cause TigerVNC to be
  333. statically linked against a custom installation of GnuTLS that resides under
  334. /opt/gnutls. GnuTLS depends on zlib, so specifying -DUSE_INCLUDED_ZLIB=1 will
  335. satisfy that dependency using TigerVNC's in-tree version of zlib, which
  336. prevents TigerVNC from depending on the libz dynamic library.
  337. MinGW
  338. -----
  339. An installer containing the GnuTLS header files, as well as static and dynamic
  340. link libraries for 32-bit MinGW, can be downloaded from the following site:
  341. http://josefsson.org/gnutls4win/
  342. As of this writing, GnuTLS cannot be built cleanly with MinGW64 due to the fact
  343. that portions of the code assume an LP64 data model (Windows uses LLP64.)
  344. Thus, it is not possible at this time to produce a Win64 version of TigerVNC
  345. with TLS support.
  346. Whether you use the above installer or build GnuTLS from source, make sure that
  347. you install the libraries and headers into a pathname that doesn't contain
  348. spaces (the installer will try to install under c:\Program Files unless you
  349. tell it otherwise.) If the GnuTLS include path contains spaces, then the MinGW
  350. resource compiler will barf when you try to build TigerVNC.
  351. You can manipulate the GNUTLS_INCLUDE_DIR and GNUTLS_LIBRARY CMake variables to
  352. specify the directory under which you installed GnuTLS. For instance, adding
  353. -DGNUTLS_INCLUDE_DIR=/c/gnutls/include \
  354. -DGNUTLS_LIBRARY=/c/gnutls/lib/libgnutls.dll.a
  355. to the CMake command line when using MinGW will cause TigerVNC to be linked
  356. against GnuTLS DLLs that are installed under c:\gnutls.
  357. Adding
  358. -DGNUTLS_INCLUDE_DIR=/c/gnutls/include \
  359. -DGNUTLS_LIBRARY='/c/gnutls/lib/libgnutls.a;/c/gnutls/lib/libgcrypt.a;/c/gnutls/lib/libtasn1.a;/c/gnutls/lib/libgpg-error.a'
  360. to the CMake command line will cause TigerVNC to be statically linked against
  361. GnuTLS libraries that are installed under c:\gnutls.
  362. ===================
  363. Installing TigerVNC
  364. ===================
  365. You can use the build system to install TigerVNC into a directory of your
  366. choosing. To do this, add:
  367. -DCMAKE_INSTALL_PREFIX={install_directory}
  368. to the CMake command line. Then, you can run 'make install' to build and
  369. install it.
  370. If you don't specify CMAKE_INSTALL_PREFIX, then the default is
  371. c:\Program Files\TigerVNC on Windows and /usr/local on Unix.
  372. =========================
  373. Creating Release Packages
  374. =========================
  375. The following commands can be used to create various types of release packages:
  376. Unix
  377. ----
  378. make tarball
  379. Create a binary tarball containing the TigerVNC Viewer
  380. make servertarball
  381. Create a binary tarball containing both the TigerVNC Server and Viewer
  382. make dmg
  383. Create Macintosh disk image file that contains an application bundle of the
  384. TigerVNC Viewer
  385. make udmg
  386. On 64-bit OS X systems, this creates a version of the Macintosh package and
  387. disk image which contains universal i386/x86-64 binaries. You should first
  388. configure a 32-bit out-of-tree build of TigerVNC, then configure a 64-bit
  389. out-of-tree build, then run 'make udmg' from the 64-bit build directory. The
  390. build system will look for the 32-bit build under {source_directory}/osxx86
  391. by default, but you can override this by setting the OSX_X86_BUILD CMake
  392. variable to the directory containing your configured 32-bit build. Either
  393. the 64-bit or 32-bit build can be configured to be backward compatible by
  394. using the instructions in the "Build Recipes" section.
  395. Windows
  396. -------
  397. make installer
  398. Create a Windows installer using Inno Setup. The installer package
  399. (TigerVNC[64].exe) will be located under {build_directory}.
  400. =============
  401. Build Recipes
  402. =============
  403. 32-bit Build on 64-bit Linux/Unix (including OS X)
  404. --------------------------------------------------
  405. Set the following environment variables before building TigerVNC.
  406. CFLAGS='-O3 -m32'
  407. CXXFLAGS='-O3 -m32'
  408. LDFLAGS=-m32
  409. If you are building the TigerVNC Server on a modern Unix/Linux system, then
  410. you will also need to pass the appropriate --host argument when configuring the
  411. X server source (for instance, --host=i686-pc-linux-gnu).
  412. 64-bit Backward-Compatible Build on 64-bit OS X
  413. -----------------------------------------------
  414. Add
  415. -DCMAKE_OSX_SYSROOT=/Developer/SDKs/MacOSX10.5.sdk \
  416. -DCMAKE_OSX_DEPLOYMENT_TARGET=10.5
  417. to the CMake command line. The OS X 10.5 SDK must be installed.
  418. 32-bit Backward-Compatible Build on 64-bit OS X
  419. -----------------------------------------------
  420. Set the following environment variables:
  421. CC=gcc-4.0
  422. CXX=g++-4.0
  423. CFLAGS='-O3 -m32'
  424. CXXFLAGS='-O3 -m32'
  425. LDFLAGS=-m32
  426. and add
  427. -DCMAKE_OSX_SYSROOT=/Developer/SDKs/MacOSX10.4u.sdk \
  428. -DCMAKE_OSX_DEPLOYMENT_TARGET=10.4
  429. to the CMake command line. The OS X 10.4 SDK must be installed.
  430. 64-bit MinGW Build on Cygwin
  431. ----------------------------
  432. cd {build_directory}
  433. CC=/usr/bin/x86_64-w64-mingw32-gcc CXX=/usr/bin/x86_64-w64-mingw32-g++ \
  434. RC=/usr/bin/x86_64-w64-mingw32-windres \
  435. cmake -G "Unix Makefiles" -DCMAKE_SYSTEM_NAME=Windows \
  436. -DCMAKE_AR=/usr/bin/x86_64-w64-mingw32-ar \
  437. -DCMAKE_RANLIB=/usr/bin/x86_64-w64-mingw32-ranlib {source_directory}
  438. make
  439. This produces a 64-bit build of TigerVNC that does not depend on cygwin1.dll or
  440. other Cygwin DLL's. The mingw64-x86_64-gcc-core and mingw64-x86_64-gcc-g++
  441. packages (and their dependencies) must be installed.
  442. 32-bit MinGW Build on Cygwin
  443. ----------------------------
  444. cd {build_directory}
  445. CC=/usr/bin/i686-w64-mingw32-gcc CXX=/usr/bin/i686-w64-mingw32-g++ \
  446. RC=/usr/bin/i686-w64-mingw32-windres \
  447. cmake -G "Unix Makefiles" -DCMAKE_SYSTEM_NAME=Windows \
  448. -DDCMAKE_AR=/usr/bin/i686-w64-mingw32-ar \
  449. -DCMAKE_RANLIB=/usr/bin/i686-w64-mingw32-ranlib {source_directory}
  450. make
  451. This produces a 32-bit build of TigerVNC that does not depend on cygwin1.dll or
  452. other Cygwin DLL's. The mingw64-i686-gcc-core and mingw64-i686-gcc-g++
  453. packages (and their dependencies) must be installed.
  454. MinGW-w64 Build on Windows
  455. --------------------------
  456. This produces a 64-bit build of TigerVNC using the "native" MinGW-w64 toolchain
  457. (which is faster than the Cygwin version):
  458. cd {build_directory}
  459. CC={mingw-w64_binary_path}/x86_64-w64-mingw32-gcc \
  460. CXX={mingw-w64_binary_path}/x86_64-w64-mingw32-g++ \
  461. RC={mingw-w64_binary_path}/x86_64-w64-mingw32-windres \
  462. cmake -G "MSYS Makefiles" \
  463. -DCMAKE_AR={mingw-w64_binary_path}/x86_64-w64-mingw32-ar \
  464. -DCMAKE_RANLIB={mingw-w64_binary_path}/x86_64-w64-mingw32-ranlib \
  465. {source_directory}
  466. make
  467. MinGW Build on Linux
  468. --------------------
  469. cd {build_directory}
  470. CC={mingw_binary_path}/i386-mingw32-gcc \
  471. CXX={mingw_binary_path}/i386-mingw32-g++ \
  472. RC={mingw_binary_path}/i386-mingw32-windres \
  473. cmake -G "Unix Makefiles" -DCMAKE_SYSTEM_NAME=Windows \
  474. -DCMAKE_AR={mingw_binary_path}/i386-mingw32-ar \
  475. -DCMAKE_RANLIB={mingw_binary_path}/i386-mingw32-ranlib \
  476. {source_directory}
  477. make