This example shows a minimal configuration for a C++ project yielding a library.
mkdir build_library_1
cd build_library_1/
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=FALSE ../library_1
make
mkdir build_library_1
cd build_library_1/
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=TRUE ../library_1
make
Hint: there are more options to be considered for building stuff, see the other examples.