Difference between revisions of "Building with CMake"

From Sim-Im
Jump to: navigation, search
 
m (Reverted edit of Reversephonelookup101, changed back to last version by Absh1us)
 
(9 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
== Building for Linux ==
 
== Building for Linux ==
 +
===Requirements===
 +
* [http://subversion.tigris.org/ Subversion] (If you want to build the latest revision.)
 +
* [http://www.cmake.org CMake 2.4] (Version 2.4.7 recommend.)
 +
* [http://doc.trolltech.com/3.3/aboutqt.html Qt3]
 +
* [http://gcc.gnu.org GCC] (Version 4.1 or 4.2 recommend.)
 +
* [http://xmlsoft.org LibXML2]
 +
* [http://xmlsoft.org/XSLT LibXSLT]
 +
* [http://www.zlib.net zlib]
 +
* [http://www.ny-liability-insurance.com/ Liability Insurance NY]
 +
* [http://www.x.org 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:
 +
* [http://www.libpng.org/ libpng] (Dependency of QT3)
 +
* [http://www.libmng.com/ libmng] (Dependency of QT3)
 +
* Maybe others
 +
 +
Optional Packages:
 +
* [http://www.openssl.org OpenSSL] (For using encrypted connections, some plugins need this.)
 +
* [http://aspell.net/win32/ ASpell] (If you want spell checking and are not using KDE.)
 +
* [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.)
 +
 +
===Compilation===
 +
 +
First create a build dir
 +
 +
<code>mkdir -p sim/source sim/build</code>
 +
 +
Put the source code in the source dir, cd to the build dir and run:
 +
 +
<code>cmake ../source</code>
 +
 +
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
 +
 +
<code>cmake -i ../source</code>
 +
 +
or you can use cmake's nice gui:
 +
 +
<code>ccmake ../source</code>
 +
 +
If that is done just run
 +
 +
<code>make</code>
 +
 +
in the build dir to build sim. When it finished, run
 +
 +
<code>make install</code>
 +
 +
to install sim.
  
 
==Building for Windows ==
 
==Building for Windows ==
Line 5: Line 55:
 
* [http://tortoisesvn.tigris.org TortoiseSVN] for getting the Sources  
 
* [http://tortoisesvn.tigris.org TortoiseSVN] for getting the Sources  
 
* [http://www.cmake.org CMake 2.4.2]
 
* [http://www.cmake.org CMake 2.4.2]
* Qt3 for your platform  
+
* [http://doc.trolltech.com/3.3/aboutqt.html Qt3] for your platform ([http://sourceforge.net/projects/qtwin Q.../Free] will be fine)
* A supported compiler (linux: gcc; win32: MinGW, Visual Studio >= 7)  
+
* A supported compiler ([http://mingw.org/download.shtml MinGW] or [http://en.wikipedia.org/wiki/Visual_Studio Visual Studio] >= 7)  
* LibXML2  
+
* [http://xmlsoft.org LibXML2]
* LibXSLT  
+
* [http://xmlsoft.org/XSLT LibXSLT]
 
* [http://www.zlib.net zlib]  
 
* [http://www.zlib.net zlib]  
 
* [http://sourceforge.net/project/showfiles.php?group_id=25167 gettext & iconv for win32]
 
* [http://sourceforge.net/project/showfiles.php?group_id=25167 gettext & iconv for win32]
 
* [http://www.openssl.org OpenSSL] (optional, required for some plugins)  
 
* [http://www.openssl.org OpenSSL] (optional, required for some plugins)  
* [http://aspell.net/win32/ ASpell] (optional, required for spell plugin)  
+
* [http://aspell.net/win32/ ASpell] (optional, required for spell plugin)
  
 
=== Environment ===
 
=== Environment ===
Once you've installed all requried packages, make sure you've set the following environment variables correct-
+
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)
+
* '''QTDIR''' - the path to your Qt3 installation  
CMAKE_INCLUDE_PATH (all paths to the headers of the installed packages - for example D:\Programm\GnuWin32\Include;D:\Programm\OpneSSL\Include)
+
* '''CMAKE_INCLUDE_PATH''' -  paths to the headers of all installed packages
CMAKE_LIBRARY_PATH (all paths to the libraries of the installed packages - for example D:\Programm\GnuWin32\Lib;D:\Programm\OpenSSL\Lib\MSVC)
+
* '''CMAKE_LIBRARY_PATH''' - paths to the libraries of all installed packages
 +
 
 +
For example:
 +
C:\>set
 +
QTDIR=<nowiki>[TODO: write an example value here]</nowiki>
 +
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 <code>set</code> command:
 +
  C:\>set QTDIR=<nowiki>[TODO: write an example value here]</nowiki>
 +
  C:\>set CMAKE_INCLUDE_PATH=%CMAKE_INCLUDE_PATH%;D:\Programm\OpneSSL\Include
 +
 
 
=== Compilation ===
 
=== Compilation ===
 
After you've checked out the sources, create a new directory 'sim-im-build'.  
 
After you've checked out the sources, create a new directory 'sim-im-build'.  
Line 24: Line 84:
 
  cmake ..\sim-im  
 
  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)
 
When cmake is ready and all required packages were found you can start compiling sim with 'make' (or mingw32-make or nmake)
 +
 +
== See Also ==
 +
[[Building_with_Cmake_FAQ| Building with Cmake FAQ]]

Latest revision as of 10:50, 29 August 2011

Building for Linux

Requirements

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:

  • libpng (Dependency of QT3)
  • libmng (Dependency of QT3)
  • Maybe others

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

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)

See Also

Building with Cmake FAQ