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 23KB

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