Building mmpong with CMake
Prequisites
Be sure to check the general Build page before reading this.
Configure
Create a directory (for example: 'build_cmake') anywhere in your filesystem, cd into this directory and point cmake to the sources (replace SOURCEDIR in the following command with the directory where your sources actually reside):
cmake SOURCEDIR
If cmake configured the sources successfully you should see something like this (produced on Debian testing):
cmake ~/downloads/mmpong-0.9 -- 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 include files CMAKE_HAVE_PTHREAD_H -- Looking for include files CMAKE_HAVE_PTHREAD_H - found -- Looking for pthread_create in pthreads -- Looking for pthread_create in pthreads - not found -- Looking for pthread_create in pthread -- Looking for pthread_create in pthread - found -- found pthreads: enabling server. -- Looking for sys/types.h -- Looking for sys/types.h - found -- Looking for stdint.h -- Looking for stdint.h - found -- Looking for stddef.h -- Looking for stddef.h - found -- Check size of void * -- Check size of void * - done -- Check size of unsigned -- Check size of unsigned - done -- Check size of in_addr_t -- Check size of in_addr_t - done -- checking for one of the modules 'caca' -- found caca, version 0.99.beta16 -- found libcaca: enabling client-caca. -- found SDL! -- found SDLIMAGE! -- found SDLMIXER! -- Looking for XOpenDisplay in /usr/lib/libX11.so;/usr/lib/libXext.so -- Looking for XOpenDisplay in /usr/lib/libX11.so;/usr/lib/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/libX11.so -- found OpenGL! -- found pkg-config! -- checking for one of the modules 'CEGUI-OPENGL' -- found CEGUI-OPENGL, version 0.6.1 -- found CEGUI! CEGUIBase;CEGUIOpenGLRenderer /usr/include/CEGUI -- activating mmpong-gl. -- Configuring done -- Generating done -- Build files have been written to: /tmp/cmake_build
Compile
make
Optional: Install
If you want to install the files in your system, you may want to use
make install
which installs the files to /usr/local as default. You can change this by passing -DCMAKE_INSTALL_PREFIX=pathtoinstallto to the cmake command above.
