From faf168cbee0a7fa7ce5ec8f71300feb0c9e15087 Mon Sep 17 00:00:00 2001
From: José Fonseca
The Mesa demos git repository can be obtained with:
Introduction
@@ -36,12 +39,12 @@ site.
- git clone git://anongit.freedesktop.org/git/mesa/demos
+git clone git://anongit.freedesktop.org/git/mesa/demos
Or, if you're a developer:
- git clone git+ssh://USERNAME@git.freedesktop.org/git/mesa/demos
+git clone git+ssh://USERNAME@git.freedesktop.org/git/mesa/demos
-The Mesa demos can be built with autoconf or +The Mesa demos can be built with autoconf, CMake, or SCons.
@@ -59,15 +62,22 @@ The Mesa demos can be built with autoconf orYou'll need glew version 1.5.4 -or later and glut or freeglut (runtime libraries and header files). +or later and glut or freeglut (runtime libraries and header files).
If you're using an RPM-based Linux distro you can install these items with:
- yum install glew glew-devel - yum install freeglut freeglut-devel +yum install glew glew-devel +yum install freeglut freeglut-devel ++ +
+And if you're using a Debian based Linux distro you can install these items with: +
++apt-get install libglew-dev freeglut3-dev@@ -85,10 +95,86 @@ Otherwise, just run ./configure ; make to build the demos. +
+See the CMake documentation for more information about CMake. +
+ ++Run: +
++cmake . +make ++ +
+Create a Toolchain.cmake file containing: +
++# the name of the target operating system +SET(CMAKE_SYSTEM_NAME Windows) + +# which compilers to use for C and C++ +SET(CMAKE_C_COMPILER i586-mingw32msvc-gcc) +SET(CMAKE_CXX_COMPILER i586-mingw32msvc-g++) + +# here is the target environment located +SET(CMAKE_FIND_ROOT_PATH /usr/i586-mingw32msvc) + +# adjust the default behaviour of the FIND_XXX() commands: +# search headers and libraries in the target environment, search +# programs in the host environment +set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) +set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) +set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) ++ +
+Create a Cache.cmake file containing: +
++set(GLEW_INCLUDE_DIR "/path/to/glew/include" CACHE PATH "" FORCE) +set(GLEW_glew_LIBRARY "/path/to/glew/lib/libglew32.a" CACHE FILEPATH "" FORCE) + +set(GLUT_INCLUDE_DIR "/path/to/glut/include" CACHE PATH "" FORCE) +set(GLUT_glut_LIBRARY "/path/to/glut/lib/libglut32.a" CACHE FILEPATH "" FORCE) ++ +
+Then do: +
++cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=/path/to/install -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_TOOLCHAIN_FILE=/path/to/Toolchain.cmake -C /path/to/Cache.cmake +make +make install ++ +
+Read this for more information about CMake and MinGW cross compilation. +
+-Just run cons to build with SCons. +Just run scons to build with SCons.
XXX more info? -- cgit v1.2.3