Difference between revisions of "Building with CMake"
Line 20: | Line 20: | ||
* [http://www.kde.org kdelibs] (For KDE integration.) | * [http://www.kde.org kdelibs] (For KDE integration.) | ||
* [http://www.gnupg.org GnuPG] (Not required at build time; required if you want to use GPG encryption for messages.) | * [http://www.gnupg.org GnuPG] (Not required at build time; required if you want to use GPG encryption for messages.) | ||
+ | |||
+ | ===Compilation=== | ||
First create a build dir | First create a build dir |
Revision as of 18:13, 30 January 2008
Building for Linux
Requirements
- Subversion (If you want to build the latest revision.)
- CMake 2.4 (Version 2.4.7 recommend.)
- Qt3
- GCC (Version 4.1 or 4.2 recommend.)
- LibXML2
- LibXSLT
- zlib
- libXScrnSaver
Note: If you use binary packages for these dependencies you will need the header packages (normally named package-dev or package-devel) of these packages, too. You might also need header packages of dependencies of these, for example:
Optional Packages:
- OpenSSL (For using encrypted connections, some plugins need this.)
- ASpell (If you want spell checking and are not using KDE.)
- kdelibs (For KDE integration.)
- GnuPG (Not required at build time; required if you want to use GPG encryption for messages.)
Compilation
First create a build dir
mkdir -p sim/source sim/build
Put the source code in the source dir, cd to the build dir and run:
cmake ../source
That will run cmake's configure checks which will check if you have got every programs/libraries/headers,that are needed to compile sim. If you want to tune some of the variables, you can either use the interactive mode of cmake
cmake -i ../source
or you can use cmake's nice gui:
ccmake ../source
If that is done just run
make
in the build dir to build sim. When it finished, run
make install
to install sim.
Building for Windows
Requirements
- TortoiseSVN for getting the Sources
- CMake 2.4.2
- Qt3 for your platform (Q.../Free will be fine)
- A supported compiler (MinGW or Visual Studio >= 7)
- LibXML2
- LibXSLT
- zlib
- gettext & iconv for win32
- OpenSSL (optional, required for some plugins)
- ASpell (optional, required for spell plugin)
Environment
Once you've installed all requried packages, make sure you've set the following environment variables are correct:
- QTDIR - the path to your Qt3 installation
- CMAKE_INCLUDE_PATH - paths to the headers of all installed packages
- CMAKE_LIBRARY_PATH - paths to the libraries of all installed packages
For example:
C:\>set QTDIR=[TODO: write an example value here] CMAKE_INCLUDE_PATH=D:\Programm\GnuWin32\Include;D:\Programm\OpneSSL\Include CMAKE_LIBRARY_PATH=D:\Programm\GnuWin32\Lib;D:\Programm\OpenSSL\Lib\MSVC
If some values are missing, use should set them using set
command:
C:\>set QTDIR=[TODO: write an example value here] C:\>set CMAKE_INCLUDE_PATH=%CMAKE_INCLUDE_PATH%;D:\Programm\OpneSSL\Include
Compilation
After you've checked out the sources, create a new directory 'sim-im-build'. Now you can call cmake (or cmakesetup on win32) by switching into 'sim-im-build':
cmake ..\sim-im
When cmake is ready and all required packages were found you can start compiling sim with 'make' (or mingw32-make or nmake)