1 =========================
2 Building LyX with CMake
3 =========================
12 * CMake or CVS version from www.cmake.org
13 * Install Qt 4 and make sure qmake 4 is found
14 (add the folder with qmake to the environment variable PATH,
15 e.g. set PATH=<your path to qt>\bin;%PATH%).
21 Install the windows supplementary modules:
22 Download ftp://ftp.lyx.org/pub/lyx/contrib/lyx-windows-deps-msvc2008.zip
23 and extract in the root directory of your LyX files (so you will get
24 a directory called lyx-windows-deps-msvc2008 next to the other directories
25 like src, development etc.).
27 If cmake couldn't find these modules set GNUWIN32_DIR, eg.
28 -DGNUWIN32_DIR=c:\gnuwin32. By default cmake searches in your
29 program folder. Or use the cmake GUI to set the GNUWIN32_DIR path.
32 Building Visual C++ project files
33 --------------------------------------
35 * Install Visual C++ 2005 or 2008 (Express version also works)
36 * When building Qt: install Platform SDK 2008, "Core" and "Web Workshop"
37 * Add include and library paths of the SDK to the IDE search paths.
38 Menu entry: Tools->Options->'VC++ directories'->'Library files' and 'Include files'
39 * Create a build directory, e.g. ..\trunk\..\build
40 * Call in the build directory 'cmake ..\trunk\development\cmake'
43 * Warnings: The default warning level of the msvc cmake builds
44 is /W3. To enable /W4 use
48 switches back to to /W3,
49 To disable a specific warning add it to MSVC_W_DISABLE in
50 cmake/CMakeLists.txt. To make the warning an error add it
53 * Memory leak detection
54 For MSVC the usage of 'Visual Leak Detection' could be enabled
55 (http://dmoulding.googlepages.com/vld): -Dvld=1
57 Building vld requires the 'Debugging Tools For Windows' (~16MB)
58 http://www.microsoft.com/whdc/devtools/debugging/default.mspx
59 Eventually you have to copy dbghelp.dll from your Visual Studio
60 Common7\IDE folder into the binary directory.
61 'vld.ini' is part of lyx.proj where you can configure vld.
63 The docu for vld could be found in development/Win32/vld, or
64 http://www.codeproject.com/tools/visualleakdetector.asp
69 * the Release build links much faster
70 * for the 'Debug' and 'Release' build all precompiled headers are enabled
71 to compile without pch (non file merge mode) This is usefull to check
72 if all necessary headers are included.
73 * use 'MinSizeRel' which only precompiles the STL and Boost headers
74 * use 'RelWithDebInfo' which does not use any precompiled headers
78 GCC/Windows (Win2k only works with MSYS, XP?)
79 ----------------------------------------------
81 * create a build directory, e.g. .../trunk/../build
82 * call: export QMAKESPEC=win32-g++ (MSYS) or set QMAKESPEC=win32-g++ (CMD)
83 * call in the build directory 'cmake ..\trunk\development\cmake'
87 Building with GCC/Linux
88 ------------------------
90 * create a build directory, e.g. .../trunk/../build
91 * call in the build directory 'cmake ../trunk/development/cmake'
92 * compiler and linker options could be suppressd by '-Dquiet=1'
98 You need additionally these packages:
105 Building with Xcode/Mac
106 -----------------------
108 * create a build directory, e.g. .../trunk/../build
109 * call in the build directory 'cmake .../trunk/development/cmake -G Xcode'
110 * open .../trunk/../build/lyx-qt4.xcodeproj
115 * Xcode prefers UTF8 when opening source files, though LyX usually uses
116 Latin1. To fix that select all source files in Xcode and click "Get Info"
117 in the context menu. Change the encoding to Latin1.
118 * You can run and debug LyX from Xcode. For LyX to find its resources, there
119 are two possibilities:
120 a) Put a resource directory, e.g. a link to the lib directory of the
121 source tree, at .../trunk/../build/bin/Resources
122 b) Select the lyx-qt4 executable in Xcode, click on "Get Info" in the
123 context menu and add "-sysdir a_valid_LyX_resource_directory"
124 pointing e.g. to a valid Contents/Resources of a LyX.app directory.
125 * LyX on Mac doesn't look for fonts in the resource directory if the
126 executable is not in an .app bundle. Instead you have to create a
127 symbolic link to the fonts directory in the place where the executable
128 is: ln -s .../trunk/lib/fonts .../trunk/../build/bin/Debug/
129 If you don't do that math character will not show up correctly.
130 * CMake properly finds the Qt4 library bundles from Trolltech's binary
131 Qt4 package for Mac. So no need to compile Qt on your own.
137 * Faster build process: with file merging enabled compilation
138 is up to 5 times faster: '-Dmerge=1'.
139 To force a complete regeneration of the created files use
142 * install win32libs with the 'KDE on Windows' installer
143 http://download.cegit.de/kde-windows/installer/
144 - use the msvc packages
145 - a release version of Qt is also available by the installer
149 To generate other build files call 'cmake'
150 which shows a list of possibilities.
153 The build process tries to find aspell on Windows
154 in %ProgramFiles%/GnuWin32/ and in /usr/ or in /usr/local
155 under Linux. If it could not find aspell, spell checking