Difference between revisions of "Building with Cmake FAQ"

From Sim-Im
Jump to: navigation, search
(Q: How to build Sim-IM without KDE support?)
(Linux)
Line 1: Line 1:
 
== Linux ==
 
== Linux ==
 +
=== Q: What is the correct way to build sim using cmake? ===
 +
'''A:''' First create a build directory outside the source code, then cd to that dir and run, for example:
 +
 +
<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.
 +
 
=== Q: How to build Sim-IM without KDE support? ===
 
=== Q: How to build Sim-IM without KDE support? ===
  
 
'''A:''' For Sim-IM 0.9.4.* and for old revisions of Sim-IM 0.9.5 you should use  
 
'''A:''' For Sim-IM 0.9.4.* and for old revisions of Sim-IM 0.9.5 you should use  
  
  cmake -D USE_KDE3:boolean=false
+
  <code>cmake -D USE_KDE3:boolean=false</code>
  
 
and for Sim-IM 0.9.5 rev. 2106 or newer
 
and for Sim-IM 0.9.5 rev. 2106 or newer
  
  cmake -D ENABLE_KDE3:boolean=false
+
  <code>cmake -D ENABLE_KDE3:boolean=false</code>
  
 
=== Q: How to build Sim-IM with debug info? ===
 
=== Q: How to build Sim-IM with debug info? ===
 
'''A:''' <code>cmake -D CMAKE_BUILD_TYPE=Debug</code>
 
'''A:''' <code>cmake -D CMAKE_BUILD_TYPE=Debug</code>

Revision as of 05:44, 20 January 2008

Linux

Q: What is the correct way to build sim using cmake?

A: First create a build directory outside the source code, then cd to that dir and run, for example:

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.

Q: How to build Sim-IM without KDE support?

A: For Sim-IM 0.9.4.* and for old revisions of Sim-IM 0.9.5 you should use

cmake -D USE_KDE3:boolean=false

and for Sim-IM 0.9.5 rev. 2106 or newer

cmake -D ENABLE_KDE3:boolean=false

Q: How to build Sim-IM with debug info?

A: cmake -D CMAKE_BUILD_TYPE=Debug