Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentes Révision précédente
Prochaine révision
Révision précédente
cmake [2017/05/19 13:38] – [Building] admincmake [2017/05/19 13:43] (Version actuelle) – [Building] admin
Ligne 51: Ligne 51:
 This will generate build scripts this should be Makefiles On Linux.  This will generate build scripts this should be Makefiles On Linux. 
  
-By default cmake will install our build into the system directories.+By default cmake will install the build into the system directories.
 To define a custom install directory we simply pass it to cmake: To define a custom install directory we simply pass it to cmake:
 <code bash> <code bash>
 $ cmake .. -DCMAKE_INSTALL_PREFIX=../install $ cmake .. -DCMAKE_INSTALL_PREFIX=../install
 +</code>
 +
 +
 +To run the build script we can simply use the Makefile:
 +
 +<code bash>
 +$ make
 +$ make install
 +</code>
 +
 +
 +We can now run our binary from the install directory:
 +
 +<code bash>
 +$ ../install/myapp
 </code> </code>
 ===== Using CMake with libraries ===== ===== Using CMake with libraries =====
  
  
  • cmake.1495201082.txt.gz
  • Dernière modification : 2017/05/19 13:38
  • de admin