cabin crew: take your seats!
[lyx.git] / INSTALL.cmake
blob0264540b366191a3d49604f0885a5d99043a7add
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        (there are also Qt packages for msvc and mingw)
31     
32     If cmake couldn't find these modules set GNUWIN32_DIR, eg. 
33     -DGNUWIN32_DIR=c:\gnuwin32. By default cmake searches in your 
34     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       
60 Some tips:
62     * rename Microsoft Visual Studio 8\VC\vcpackages\feacp.dll 
63       t o disable Intellisense
64     * the Release build links much faster 
65     * for the 'Debug' and 'Release' build all precompiled headers are enabled
66       to compile without pch (non file merge mode) This is usefull to check 
67       if all necessary headers are included.
68         * use 'MinSizeRel' which only precompiles the STL and Boost headers
69         * use 'RelWithDebInfo' which does not use any precompiled headers
73 GCC/Windows (Win2k only works with MSYS, XP?)
74 ----------------------------------------------
76     * create a build directory, e.g. .../trunk/../build
77     * call: export QMAKESPEC=win32-g++ (MSYS) or set QMAKESPEC=win32-g++ (CMD)
78     * call in the build directory 'cmake ..\trunk\development\cmake'
82 Building with GCC/Linux
83 ------------------------
85     * create a build directory, e.g. .../trunk/../build
86     * call in the build directory 'cmake ..\trunk\development\cmake'
87     * compiler and linker options could be suppressd by '-Dquiet=1' 
91 Building with Xcode/Mac
92 -----------------------
94     * create a build directory, e.g. .../trunk/../build
95     * call in the build directory 'cmake .../trunk/development/cmake -G Xcode'
96     * open .../trunk/../build/lyx-qt4.xcodeproj
99 Some tips:
101     * Xcode prefers UTF8 when opening source files, though LyX usually uses
102       Latin1. To fix that select all source files in Xcode and click "Get Info"
103       in the context menu. Change the encoding to Latin1.
104     * You can run and debug LyX from Xcode. For LyX to find its resources, there
105       are two possibilities:
106         a) Put a resource directory, e.g. a link to the lib directory of the 
107            source tree, at .../trunk/../build/bin/Resources
108         b) Select the lyx-qt4 executable in Xcode, click on "Get Info" in the 
109            context menu and add "-sysdir a_valid_LyX_resource_directory" 
110            pointing e.g. to a valid Contents/Resources of a LyX.app directory.
111     * LyX on Mac doesn't look for fonts in the resource directory if the
112       executable is not in an .app bundle. Instead you have to create a
113       symbolic link to the fonts directory in the place where the executable
114       is: ln -s .../trunk/lib/fonts .../trunk/../build/bin/Debug/
115       If you don't do that math character will not show up correctly.
116     * CMake properly finds the Qt4 library bundles from Trolltech's binary
117       Qt4 package for Mac. So no need to compile Qt on your own.
122 To generate other build files call 'cmake'
123 which shows a list of possibilities.
126 The build process tries to find aspell on Windows
127 in %ProgramFiles%/GnuWin32/ and in /usr/ or in /usr/local 
128 under Linux. If it could not find aspell, spell checking
129 will be disabled.