Difference between revisions of "Building with CMake"

From Sim-Im
Jump to navigation Jump to search
Line 5: Line 5:
 
* [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 ===

Revision as of 13:43, 4 October 2007

Building for Linux

Building for Windows

Requirements

Environment

Once you've installed all requried packages, make sure you've set the following environment variables 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)