16.4.2 La compilation

Comme toujours, on appelle CMake :

cmake .. -DOTHER_LIB_PREFIX=$HOME/usr
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found X11: /usr/lib/x86_64-linux-gnu/libX11.so
-- Found OpenGL: /usr/lib/x86_64-linux-gnu/libGL.so 
-- New prefix : /home/pierre/usr
-- New lib prefix : /home/pierre/usr/lib
-- New include prefix : /home/pierre/usr/include
-- Configuring done
-- Generating done

Puis make :

make
Scanning dependencies of target exemplecubetexturemipmaps
[  8%] Building C object src/CMakeFiles/exemplecubetexturemipmaps.dir/pointf.c.o
[ 16%] Building C object src/CMakeFiles/exemplecubetexturemipmaps.dir/load_shaders.c.o
[ 25%] Building CXX object src/CMakeFiles/exemplecubetexturemipmaps.dir/sdlglutils.cpp.o
[ 33%] Building CXX object src/CMakeFiles/exemplecubetexturemipmaps.dir/load_texture_Gl3.cpp.o
[ 41%] Building CXX object src/CMakeFiles/exemplecubetexturemipmaps.dir/vecteur3f.cpp.o
[ 50%] Building CXX object src/CMakeFiles/exemplecubetexturemipmaps.dir/matrice3f.cpp.o
[ 58%] Building CXX object src/CMakeFiles/exemplecubetexturemipmaps.dir/Vecteur4.cpp.o
[ 66%] Building CXX object src/CMakeFiles/exemplecubetexturemipmaps.dir/Matrice4.cpp.o
[ 75%] Building CXX object src/CMakeFiles/exemplecubetexturemipmaps.dir/simple_camera_gl3.cpp.o
[ 83%] Building CXX object src/CMakeFiles/exemplecubetexturemipmaps.dir/PAppSdlOpenGl3.cpp.o
[ 91%] Building CXX object src/CMakeFiles/exemplecubetexturemipmaps.dir/PAppTestSdlGl3.cpp.o
[100%] Building CXX object src/CMakeFiles/exemplecubetexturemipmaps.dir/main.cpp.o
Linking CXX executable exemplecubetexturemipmaps
[100%] Built target exemplecubetexturemipmaps

Et voilà pour la compilation.