A bit more re-organization.
[lyx.git] / INSTALL.cmake
blobaf4e254708be9ec70a70b2f7fd1b6f4f7bdc71ce
1 =========================
2 Building LyX with CMake
3 =========================
5 July, 2007
9 All systems
10 ===========
12     * CMake 2.4 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       
16     * Faster build process: with file merging enabled compilation 
17       is up to 5 times faster: '-Dmerge=1'.
18       To force a complete regeneration of the created files use
19       '-Dmerge_rebuild=1'.
23 Windows only
24 =============
26     Install the windows supplementary modules
27      * as described in INSTALL.scons
28      * install win32libs with the 'KDE on Windows' installer
29        http://download.cegit.de/kde-windows/installer/
30        - use the msvc packages
31        - a release version of Qt is also available by the installer
32     
33     If cmake couldn't find these modules set GNUWIN32_DIR, eg. 
34     -DGNUWIN32_DIR=c:\gnuwin32. By default cmake searches in your 
35     program folder
38 Building Visual C++ 2005 project files
39 --------------------------------------
41     * install Visual C++ 2005
42     * install Platform SDK 2005, "Core" and "Web Workshop"
43     * add include and library paths of the SDK to the IDE search paths.
44       Menu entry: Tools->Options->'VC++ directories'->'Library files' and 'Include files'
45     * create a build directory, e.g. ..\trunk\..\build
46     * call in the build directory 'cmake ..\trunk\development\cmake'
47     * start lyx.sln
48     
49     * Warnings: The default warning level of the msvc cmake builds 
50       is /W3. To enable /W4 use
51         '-DWALL=1 '
52       and 
53         '-DDISABLEWALL=1'
54       switches back to to /W3, 
55       To disable a specific warning add it to MSVC_W_DISABLE in
56       cmake/CMakeLists.txt. To make the warning an error add it
57       to MSVC_W_ERROR.
58       
59     * Memory leak detection
60       For MSVC the usage of 'Visual Leak Detection' could be enabled
61       (http://dmoulding.googlepages.com/vld): -Dvld=1
62       
63       Building vld requires the 'Debugging Tools For Windows' (~16MB)
64       http://www.microsoft.com/whdc/devtools/debugging/default.mspx
65       Eventually you have to copy dbghelp.dll from your Visual Studio
66       Common7\IDE folder into the binary directory. 
67       'vld.ini' is part of lyx.proj where you can configure vld.
68       
69       The docu for vld could be found in development/Win32/vld, or
70       http://www.codeproject.com/tools/visualleakdetector.asp
71       
72       
73 Some tips:
75     * rename Microsoft Visual Studio 8\VC\vcpackages\feacp.dll 
76       to disable Intellisense
77     * the Release build links much faster 
78     * for the 'Debug' and 'Release' build all precompiled headers are enabled
79       to compile without pch (non file merge mode) This is usefull to check 
80       if all necessary headers are included.
81         * use 'MinSizeRel' which only precompiles the STL and Boost headers
82         * use 'RelWithDebInfo' which does not use any precompiled headers
86 GCC/Windows (Win2k only works with MSYS, XP?)
87 ----------------------------------------------
89     * create a build directory, e.g. .../trunk/../build
90     * call: export QMAKESPEC=win32-g++ (MSYS) or set QMAKESPEC=win32-g++ (CMD)
91     * call in the build directory 'cmake ..\trunk\development\cmake'
95 Building with GCC/Linux
96 ------------------------
98     * create a build directory, e.g. .../trunk/../build
99     * call in the build directory 'cmake ../trunk/development/cmake'
100     * compiler and linker options could be suppressd by '-Dquiet=1' 
104 Ubuntu packages
105 ----------------
106     You need additionally these packages:
107       * g++
108       * cmake
109       * qt4-dev-tools
113 Building with Xcode/Mac
114 -----------------------
116     * create a build directory, e.g. .../trunk/../build
117     * call in the build directory 'cmake .../trunk/development/cmake -G Xcode'
118     * open .../trunk/../build/lyx-qt4.xcodeproj
121 Some tips:
123     * Xcode prefers UTF8 when opening source files, though LyX usually uses
124       Latin1. To fix that select all source files in Xcode and click "Get Info"
125       in the context menu. Change the encoding to Latin1.
126     * You can run and debug LyX from Xcode. For LyX to find its resources, there
127       are two possibilities:
128         a) Put a resource directory, e.g. a link to the lib directory of the 
129            source tree, at .../trunk/../build/bin/Resources
130         b) Select the lyx-qt4 executable in Xcode, click on "Get Info" in the 
131            context menu and add "-sysdir a_valid_LyX_resource_directory" 
132            pointing e.g. to a valid Contents/Resources of a LyX.app directory.
133     * LyX on Mac doesn't look for fonts in the resource directory if the
134       executable is not in an .app bundle. Instead you have to create a
135       symbolic link to the fonts directory in the place where the executable
136       is: ln -s .../trunk/lib/fonts .../trunk/../build/bin/Debug/
137       If you don't do that math character will not show up correctly.
138     * CMake properly finds the Qt4 library bundles from Trolltech's binary
139       Qt4 package for Mac. So no need to compile Qt on your own.
144 To generate other build files call 'cmake' 
145 which shows a list of possibilities.
148 The build process tries to find aspell on Windows
149 in %ProgramFiles%/GnuWin32/ and in /usr/ or in /usr/local 
150 under Linux. If it could not find aspell, spell checking
151 will be disabled.