Precision about Unix installation (XInput)
[freeglut] / README.cmake
1 How to build freeglut with CMake on Windows (MS Visual Studio)\r
2 --------------------------------------------------------------\r
3 1.  Download CMake (http://www.cmake.org/cmake/resources/software.html).\r
4     Get one of the releases from the binary distribution section.\r
5 2.  Run the CMake installer, install wherever you like. \r
6 3.  Launch CMake via Start > Program Files > CMake 2.8 > CMake (GUI)\r
7     (note that the shortcut put by the installer on your desktop does NOT\r
8     point to the CMake GUI program!)\r
9 4.  In the "Where is the source code" box, type or browse to the root\r
10     directory of your freeglut source (so that's /freeglut, not\r
11     /freeglut/src).\r
12 5.  In the "Where to build the binaries" box, type or browse to any\r
13     folder you like - this will be where the Visual Studio solution will be\r
14     generated. This folder does not have to exist yet.\r
15 6.  Hit the Configure button near the bottom of the window. \r
16 7.  Pick your target compiler, make sure that its installed on your\r
17     system of course!\r
18 8.  Answer Ok when asked if you want to create the build directory. \r
19 9.  Wait for the configure process to finish. \r
20 10. The screen will now have some configuration options on it, for\r
21     instance specifying whether you want to build static and/or shared\r
22     libraries (see below for a complete list). When you've selected your\r
23     options, click the Configure button again.\r
24 11. The Generate button at the bottom will now be enabled. Click Generate.\r
25 12. The build files will now be generated in the location you picked. \r
26 \r
27 You can now navigate to the build directory you specified in step 5.\r
28 Open the freeglut.sln file that was generated in your build directory,\r
29 and compile as usual\r
30 \r
31 \r
32 How to build freeglut on UNIX\r
33 -----------------------------\r
34 - Make sure you have cmake installed. Examples:\r
35   - Debian/Ubuntu: apt-get install cmake\r
36   - Fedora: yum install cmake\r
37   - FreeBSD: cd /usr/ports/devel/cmake && make install\r
38   Or directly from their website:\r
39   http://www.cmake.org/cmake/resources/software.html\r
40 - Install XInput: libxi-dev / libXi-devel\r
41 - Run 'cmake .' in the freeglut directory to generate the makefile.\r
42 - Run 'make' to build, and 'make install' to install freeglut.\r
43 - If you wish to change any build options run 'ccmake .'\r
44 \r
45 \r
46 Breakdown of CMake configuration options\r
47 ----------------------------------------\r
48 BUILD_SHARED_LIBS       [ON, OFF] Build freeglut as a shared library\r
49 BUILD_STATIC_LIBS       [ON, OFF] Build freeglut as a static library\r
50 CMAKE_BUILD_TYPE        [Empty, Debug, Release] Can be overriden by passing it\r
51                         as a make variable during build.\r
52 CMAKE_INSTALL_PREFIX    Installation prefix (e.g. /usr/local on UNIX)\r
53 FREEGLUT_BUILD_DEMOS    [ON, OFF] Controls whether the demos are built or not.\r
54 FREEGLUT_GLES1          [ON, OFF] TODO\r
55 FREEGLUT_GLES2          [ON, OFF] TODO\r