Mostly this is quick, "do nothing" ifdefs when built with
SYSTEM=linux-osmesa, to support the off-screen rendering mode of Mesa in
headless tests. Support in glewinfo and visualinfo is enough to get
them compile, but insufficient for them to run successfully.
The compatibility functions have not only been un-removed, but also
un-deprecated, so they should be present in the forward-compatible
compatibility profile.
The expression follows the function definition separated by a ~ character,
and is a simple boolean expression built with operators && and || from the
elementary expressions "core" "forward" or a GL version number like "3.2".
Parentheses are not supported, && binds stronger than || and may be ommited,
i.e. "3.2 core" is equivalent to "3.2 && core".
For GL versions since 3.0 the glGetString() function is deprecated or removed,
and the right way to query extensions is glGetStringi(), but that has to be
loaded first.
Also instead of searching the whole extension string n times lookup the
known extensions in a static hash table. The hash table is built with
the gperf utility.
Installs a config module if CMake verion >= 2.8.12.
The config-module creates the import library targets
built in the project (glew, glew_s, glewmx, glewmx_s)
but in accordance with the FindGLEW module shipped with
CMake, it also creates GLEW::GLEW and GLEW::GLEWMX.
GLEW::GLEW and GLEW::GLEWMX will be simply copies of
glew/glewmx or glew_s/glewmx_s. If both versions are
available they alias the shared versions.
The default behaviour can be changed either when installing
or when using the package:
- Set BUILD_SHARED_LIBS to OFF or ON when building and
installing GLEW. This controls which libraries
(shared or static) will be installed (and not which
will be built).
- Set GLEW_USE_STATIC_LIBS to OFF or ON before calling
`find_package(GLEW CONFIG REQUIRED)` to force
the config-module to create GLEW::GLEW and GLEWMX
as aliases to glew/glewmx or glew_s/glewmx_s
The script ./cmake-testbuild.sh is added to test the
CMake build and config-module. See instructions there.