Commit 194a0ae4 authored by Jan Möbius's avatar Jan Möbius

Trying a cmake version of glew

parent 57972fb6
......@@ -9,7 +9,6 @@ include_directories (
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
${OPENGL_INCLUDE_DIR}
${GLEW_INCLUDE_DIR}
)
# Linking for apple is special here as the linker pulls in the dependencies, we have to set them like in PluginLib!
......@@ -30,14 +29,8 @@ if( APPLE )
endforeach ()
link_directories (
${GLEW_LIBRARY_DIR}
${ADDITIONAL_PLUGINLIB_LINK_DIRS}
)
else (APPLE)
link_directories (
${GLEW_LIBRARY_DIR}
)
endif(APPLE)
if (WIN32)
......@@ -225,11 +218,12 @@ target_link_libraries (${OPENFLIPPER_PRODUCT_STRING}
OpenFlipperPluginLib
${QT_LIBRARIES}
${OPENGL_LIBRARIES}
${GLEW_LIBRARY}
${COREAPP_ADDITIONAL_LINK_LIBRARIES}
${OPENFLIPPER_STATIC_PLUGINS}
libglew_shared
)
if (APPLE)
if ( EXISTS ${BRANDING_DIRECTORY} )
......
......@@ -42,13 +42,11 @@ include_directories (
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
${OPENGL_INCLUDE_DIR}
${GLEW_INCLUDE_DIR}
${ADDITIONAL_PLUGINLIB_INCS}
${PACKAGE_INCLUDES}
)
link_directories (
${GLEW_LIBRARY_DIR}
${ADDITIONAL_PLUGINLIB_LINK_DIRS}
)
......@@ -142,7 +140,6 @@ target_link_libraries (OpenFlipperPluginLib
ACG
${QT_LIBRARIES}
${OPENGL_LIBRARIES}
${GLEW_LIBRARY}
${FTGL_LIBS}
${ADDITIONAL_PLUGINLIB_LIBS}
)
......
......@@ -208,11 +208,6 @@ if (NOT OPENGL_FOUND)
message (FATAL_ERROR "OpengGL not found!")
endif ()
find_package (GLEW)
if (NOT GLEW_FOUND)
message (FATAL_ERROR "GLEW not found!")
endif ()
# using the internal openmesh delivered by the svn repo (default) or use some external installation
set (USE_INTERNAL_OPENMESH ON CACHE BOOL "Use and build internal version of OpenMesh found in libs_required")
......@@ -249,6 +244,7 @@ enable_testing()
# Build all additional libraries
# ========================================================================
add_subdirectory (OpenFlipper/libs_required/glew)
add_subdirectory (OpenFlipper/libs_required/OpenMesh)
add_subdirectory (OpenFlipper/libs_required/ACG)
......
# - Try to find GLEW
# Once done this will define
#
# GLEW_FOUND - system has GLEW
# GLEW_INCLUDE_DIR - the GLEW include directory
# GLEW_LIBRARY_DIR - where the libraries are
# GLEW_LIBRARY - Link these to use GLEW
#
IF (GLEW_INCLUDE_DIR)
# Already in cache, be silent
SET(GLEW_FIND_QUIETLY TRUE)
ENDIF (GLEW_INCLUDE_DIR)
if( WIN32 )
# Check if the base path is set
if ( NOT CMAKE_WINDOWS_LIBS_DIR )
# This is the base directory for windows library search used in the finders we shipp.
set(CMAKE_WINDOWS_LIBS_DIR "c:\libs" CACHE STRING "Default Library search dir on windows." )
endif()
if ( CMAKE_GENERATOR MATCHES "^Visual Studio 11.*Win64" )
SET(VS_SEARCH_PATH "${CMAKE_WINDOWS_LIBS_DIR}/vs2012/x64/")
elseif ( CMAKE_GENERATOR MATCHES "^Visual Studio 11.*" )
SET(VS_SEARCH_PATH "${CMAKE_WINDOWS_LIBS_DIR}/vs2012/x32/")
elseif ( CMAKE_GENERATOR MATCHES "^Visual Studio 12.*Win64" )
SET(VS_SEARCH_PATH "${CMAKE_WINDOWS_LIBS_DIR}/vs2013/x64/")
elseif ( CMAKE_GENERATOR MATCHES "^Visual Studio 12.*" )
SET(VS_SEARCH_PATH "${CMAKE_WINDOWS_LIBS_DIR}/vs2013/x32/")
elseif ( CMAKE_GENERATOR MATCHES "^Visual Studio 14.*Win64" )
SET(VS_SEARCH_PATH "${CMAKE_WINDOWS_LIBS_DIR}/vs2015/x64/")
elseif ( CMAKE_GENERATOR MATCHES "^Visual Studio 14.*" )
SET(VS_SEARCH_PATH "${CMAKE_WINDOWS_LIBS_DIR}/vs2015/x32/")
elseif ( CMAKE_GENERATOR MATCHES "^Visual Studio 15.*Win64" )
SET(VS_SEARCH_PATH "${CMAKE_WINDOWS_LIBS_DIR}/vs2017/x64/")
elseif ( CMAKE_GENERATOR MATCHES "^Visual Studio 15.*" )
SET(VS_SEARCH_PATH "${CMAKE_WINDOWS_LIBS_DIR}/vs2017/x32/")
endif()
if( MSVC80 )
set( COMPILER_PATH "C:/Program\ Files/Microsoft\ Visual\ Studio\ 8/VC" )
endif( MSVC80 )
if( MSVC71 )
set( COMPILER_PATH "C:/Program\ Files/Microsoft\ Visual\ Studio\ .NET\ 2003/Vc7" )
endif( MSVC71 )
FIND_PATH( GLEW_INCLUDE_DIR gl/glew.h gl/wglew.h
PATHS "${CMAKE_WINDOWS_LIBS_DIR}/glew/include"
"${CMAKE_WINDOWS_LIBS_DIR}/glew-1.6.0/include"
${COMPILER_PATH}/PlatformSDK/Include
"${VS_SEARCH_PATH}glew-2.0.0/include"
"${VS_SEARCH_PATH}glew-1.10.0/include"
"${VS_SEARCH_PATH}glew-1.13.0/include")
SET( GLEW_NAMES glew32 )
FIND_LIBRARY( GLEW_LIBRARY
NAMES ${GLEW_NAMES}
PATHS "${CMAKE_WINDOWS_LIBS_DIR}/glew/lib"
"${CMAKE_WINDOWS_LIBS_DIR}/glew-1.6.0/lib"
${COMPILER_PATH}/PlatformSDK/Lib
"${VS_SEARCH_PATH}glew-2.0.0/lib"
"${VS_SEARCH_PATH}glew-1.10.0/lib"
"${VS_SEARCH_PATH}glew-1.13.0/lib" )
else( WIN32 )
FIND_PATH( GLEW_INCLUDE_DIR GL/glew.h GL/wglew.h
PATHS /usr/local/include /usr/include )
SET( GLEW_NAMES glew GLEW )
FIND_LIBRARY( GLEW_LIBRARY
NAMES ${GLEW_NAMES}
PATHS /usr/lib /usr/local/lib )
endif( WIN32 )
GET_FILENAME_COMPONENT( GLEW_LIBRARY_DIR ${GLEW_LIBRARY} PATH )
IF (GLEW_INCLUDE_DIR AND GLEW_LIBRARY)
SET(GLEW_FOUND TRUE)
ELSE (GLEW_INCLUDE_DIR AND GLEW_LIBRARY)
SET( GLEW_FOUND FALSE )
SET( GLEW_LIBRARY_DIR )
ENDIF (GLEW_INCLUDE_DIR AND GLEW_LIBRARY)
......@@ -527,7 +527,6 @@ function (_build_openflipper_plugin plugin)
${${_PLUGIN}_DEPS_INCDIRS}
${${_PLUGIN}_INCDIRS}
${OPENGL_INCLUDE_DIR}
${GLEW_INCLUDE_DIR}
${CMAKE_BINARY_DIR}/OpenFlipper/PluginLib
${PACKAGE_INCLUDES}
${${_PLUGIN}_TYPE_INCLUDES}
......
......@@ -22,11 +22,6 @@ if (NOT OPENGL_FOUND)
message (FATAL_ERROR "OpengGL not found!")
endif ()
find_package (GLEW)
if (NOT GLEW_FOUND)
message (FATAL_ERROR "GLEW not found!")
endif ()
find_package (OpenMesh)
if (NOT OPENMESH_FOUND)
message (FATAL_ERROR "OpenMesh not found!")
......@@ -36,8 +31,7 @@ set(INCLUDE_DIRS ${OPENMESH_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/ShaderUtils
${CMAKE_CURRENT_BINARY_DIR}
${OPENGL_INCLUDE_DIR}
${GLEW_INCLUDE_DIR} )
${OPENGL_INCLUDE_DIR} )
set(ADDITIONAL_LINK_LIBRARIES "" )
set(ADDITIONAL_BUILD_DIRS "" )
......@@ -65,10 +59,6 @@ include_directories (
${INCLUDE_DIRS}
)
link_directories (
${GLEW_LIBRARY_DIR}
)
#===================================================================
# ACG Library setup
#===================================================================
......@@ -135,9 +125,10 @@ endif()
target_link_libraries ( ACG ${OPENMESH_LIBRARIES}
${QT_LIBRARIES}
${OPENGL_LIBRARIES}
${GLEW_LIBRARY}
${ADDITIONAL_LINK_LIBRARIES} )
add_dependencies(ACG libglew_shared)
#===================================================================
# Setting up the unit tests
#===================================================================
......
language: cpp
sudo: false
install:
script:
- make -C auto clobber
- make extensions
- make dist-src
- make clean && SYSTEM=linux make
- make clean && SYSTEM=linux-osmesa make
#- make clean && SYSTEM=linux-egl make
- make clean && SYSTEM=linux-clang make
#- make clean && SYSTEM=linux-clang-egl make
- pushd build/cmake && git clean -xdf . && cmake -G 'Unix Makefiles' . && make && popd
- pushd build/cmake && git clean -xdf . && cmake -G 'Unix Makefiles' -DGLEW_OSMESA=1 . && make && popd
#- pushd build/cmake && git clean -xdf . && cmake -G 'Unix Makefiles' -DGLEW_EGL=1 . && make && popd
addons:
apt:
packages:
- git
- cmake
- dos2unix
- libosmesa6-dev
# - libegl1-mesa-dev
artifacts:
paths:
- $(ls *.zip *.tgz | tr "\n" ":")
- $(find doc -type f | tr "\n" ":")
CMAKE_MINIMUM_REQUIRED( VERSION 2.6 )
PROJECT( "glew" )
SET( SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src )
SET( INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include )
SET( RC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/build )
#SET( CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib )
#SET( CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib )
#SET( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin )
OPTION( glew-cmake_BUILD_SHARED "Build the shared glew library" ON )
OPTION( glew-cmake_BUILD_STATIC "Build the static glew library" ON )
OPTION( glew-cmake_BUILD_SINGLE_CONTEXT "Build the single context glew library" ON )
OPTION( glew-cmake_BUILD_MULTI_CONTEXT "Build the multi context glew library" ON )
SET( LIBGLEW_SRCS ${SRC_DIR}/glew.c )
IF( WIN32 )
ADD_DEFINITIONS( -DWIN32_MEAN_AND_LEAN -DVC_EXTRALEAN -DGLEW_BUILD -D_CRT_SECURE_NO_WARNINGS )
ENDIF( )
IF( MSVC )
LIST( APPEND LIBGLEW_SRCS ${RC_DIR}/glew.rc )
ENDIF( )
IF( NOT USE_GLU )
ADD_DEFINITIONS( -DGLEW_NO_GLU )
ENDIF( )
IF( WIN32 )
SET( GL_LIBRARY opengl32 )
ELSEIF( APPLE )
FIND_LIBRARY( GL_LIBRARY OpenGL )
FIND_LIBRARY( AGL_LIBRARY AGL )
SET( PLATFORM_SPECIFIC_LIBRARIES ${AGL_LIBRARY} )
ELSE( )
SET( GL_LIBRARY GL )
SET( PLATFORM_SPECIFIC_LIBRARIES X11 dl Xext )
ENDIF( )
IF ( glew-cmake_BUILD_STATIC )
IF ( glew-cmake_BUILD_SINGLE_CONTEXT )
ACG_ADD_LIBRARY( libglew_static STATIC ${LIBGLEW_SRCS} )
SET_TARGET_PROPERTIES( libglew_static PROPERTIES
ARCHIVE_OUTPUT_NAME "glew"
DEBUG_POSTFIX d )
TARGET_INCLUDE_DIRECTORIES( libglew_static PUBLIC ${INCLUDE_DIR} )
TARGET_LINK_LIBRARIES( libglew_static ${GL_LIBRARY} ${PLATFORM_SPECIFIC_LIBRARIES} )
INSTALL( TARGETS libglew_static DESTINATION lib )
ENDIF ( )
IF ( glew-cmake_BUILD_MULTI_CONTEXT )
ACG_ADD_LIBRARY( libglewmx_static STATIC ${LIBGLEW_SRCS} )
SET_TARGET_PROPERTIES( libglewmx_static PROPERTIES
ARCHIVE_OUTPUT_NAME "glewmx"
DEBUG_POSTFIX d )
TARGET_COMPILE_DEFINITIONS( libglewmx_static INTERFACE GLEW_MX)
TARGET_INCLUDE_DIRECTORIES( libglewmx_static PUBLIC ${INCLUDE_DIR} )
TARGET_LINK_LIBRARIES( libglewmx_static ${GL_LIBRARY} ${PLATFORM_SPECIFIC_LIBRARIES} )
INSTALL( TARGETS libglewmx_static DESTINATION lib )
ENDIF ( )
ENDIF ( )
IF ( glew-cmake_BUILD_SHARED )
IF ( glew-cmake_BUILD_SINGLE_CONTEXT )
ACG_ADD_LIBRARY( libglew_shared SHARED ${LIBGLEW_SRCS} )
SET_TARGET_PROPERTIES( libglew_shared PROPERTIES
RUNTIME_OUTPUT_NAME "glew"
LIBRARY_OUTPUT_NAME "glew"
DEBUG_POSTFIX d )
TARGET_INCLUDE_DIRECTORIES( libglew_shared PUBLIC ${INCLUDE_DIR} )
TARGET_LINK_LIBRARIES( libglew_shared ${GL_LIBRARY} ${PLATFORM_SPECIFIC_LIBRARIES} )
INSTALL( TARGETS libglew_shared DESTINATION lib )
ENDIF ( )
IF ( glew-cmake_BUILD_MULTI_CONTEXT )
ACG_ADD_LIBRARY( libglewmx_shared SHARED ${LIBGLEW_SRCS} )
SET_TARGET_PROPERTIES( libglewmx_shared PROPERTIES
RUNTIME_OUTPUT_NAME "glewmx"
LIBRARY_OUTPUT_NAME "glewmx"
DEBUG_POSTFIX d )
TARGET_COMPILE_DEFINITIONS( libglewmx_shared INTERFACE GLEW_MX)
TARGET_INCLUDE_DIRECTORIES( libglewmx_shared PUBLIC ${INCLUDE_DIR} )
TARGET_LINK_LIBRARIES( libglewmx_shared ${GL_LIBRARY} ${PLATFORM_SPECIFIC_LIBRARIES} )
INSTALL( TARGETS libglewmx_shared DESTINATION lib )
ENDIF ( )
ENDIF ( )
FILE( GLOB PUBLIC_HEADERS "include/GL/*.h" )
INSTALL( FILES ${PUBLIC_HEADERS} DESTINATION include/GL/ )
IF( ${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_SOURCE_DIR} AND NOT ONLY_LIBS )
SET( GLEWINFO_SRCS ${SRC_DIR}/glewinfo.c )
SET( VISUALINFO_SRCS ${SRC_DIR}/visualinfo.c )
IF( MSVS )
LIST( APPEND GLEWINFO_SRCS ${RC_DIR}/glewinfo.rc )
LIST( APPEND VISUALINFO_SRCS ${RC_DIR}/visualinfo.rc )
ENDIF( )
ADD_EXECUTABLE( glewinfo ${GLEWINFO_SRCS} )
ADD_EXECUTABLE( visualinfo ${VISUALINFO_SRCS} )
IF ( glew-cmake_BUILD_STATIC )
TARGET_LINK_LIBRARIES( glewinfo libglew_static )
TARGET_LINK_LIBRARIES( visualinfo libglew_static )
ELSE ( )
TARGET_LINK_LIBRARIES( glewinfo libglew_shared )
TARGET_LINK_LIBRARIES( visualinfo libglew_shared )
ENDIF ( )
INSTALL( TARGETS glewinfo visualinfo DESTINATION bin )
ENDIF( )
The OpenGL Extension Wrangler Library
Copyright (C) 2002-2007, Milan Ikits <milan ikits[]ieee org>
Copyright (C) 2002-2007, Marcelo E. Magallon <mmagallo[]debian org>
Copyright (C) 2002, Lev Povalahev
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* The name of the author may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
THE POSSIBILITY OF SUCH DAMAGE.
Mesa 3-D graphics library
Version: 7.0
Copyright (C) 1999-2007 Brian Paul All Rights Reserved.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Copyright (c) 2007 The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Materials.
THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
This diff is collapsed.
Repository from:
https://github.com/Perlmint/glew-cmake
# GLEW - The OpenGL Extension Wrangler Library
The OpenGL Extension Wrangler Library (GLEW) is a cross-platform open-source C/C++ extension loading library. GLEW provides efficient run-time mechanisms for determining which OpenGL extensions are supported on the target platform. OpenGL core and extension functionality is exposed in a single header file. GLEW has been tested on a variety of operating systems, including Windows, Linux, Mac OS X, FreeBSD, Irix, and Solaris.
![](http://glew.sourceforge.net/glew.png)
http://glew.sourceforge.net/
https://github.com/nigels-com/glew
[![Build Status](https://travis-ci.org/nigels-com/glew.svg?branch=master)](https://travis-ci.org/nigels-com/glew)
[![Gitter](https://badges.gitter.im/nigels-com/glew.svg)](https://gitter.im/nigels-com/glew?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
[![Download](https://img.shields.io/sourceforge/dm/glew.svg)](https://sourceforge.net/projects/glew/files/latest/download)
## Downloads
Current release is [2.1.0](https://sourceforge.net/projects/glew/files/glew/2.1.0/).
[(Change Log)](http://glew.sourceforge.net/log.html)
Sources available as
[ZIP](https://sourceforge.net/projects/glew/files/glew/2.1.0/glew-2.1.0.zip/download) or
[TGZ](https://sourceforge.net/projects/glew/files/glew/2.1.0/glew-2.1.0.tgz/download).
Windows binaries for [32-bit and 64-bit](https://sourceforge.net/projects/glew/files/glew/2.1.0/glew-2.1.0-win32.zip/download).
### Recent snapshots
Snapshots may contain new features, bug-fixes or new OpenGL extensions ahead of tested, official releases.
[glew-20181010.tgz](https://sourceforge.net/projects/glew/files/glew/snapshots/glew-20181010.tgz/download) *GLEW 2.2.0 RC1: New extensions, bug fixes*
## Build
It is highly recommended to build from a tgz or zip release snapshot.
The code generation workflow is a complex brew of gnu make, perl and python, that works best on Linux or Mac.
For most end-users of GLEW the official releases are the best choice, with first class support.
### Linux and Mac
#### Using GNU Make
##### Install build tools
Debian/Ubuntu/Mint: `$ sudo apt-get install build-essential libxmu-dev libxi-dev libgl-dev`
RedHat/CentOS/Fedora: `$ sudo yum install libXmu-devel libXi-devel libGL-devel`
FreeBSD: `# pkg install xorg lang/gcc git cmake gmake bash python perl5`
##### Build
$ make
$ sudo make install
$ make clean
Targets: `all, glew.lib (sub-targets: glew.lib.shared, glew.lib.static), glew.bin, clean, install, uninstall`
Variables: `SYSTEM=linux-clang, GLEW_DEST=/usr/local, STRIP=`
_Note: may need to make **auto** folder_
##### Linux EGL
$ sudo apt install libegl1-mesa-dev
$ make SYSTEM=linux-egl
##### Linux OSMesa
$ sudo apt install libosmesa-dev
$ make SYSTEM=linux-osmesa
##### Linux mingw-w64
$ sudo apt install mingw-w64
$ make SYSTEM=linux-mingw32
$ make SYSTEM=linux-mingw64
#### Using cmake
*CMake 2.8.12 or higher is required.*
##### Install build tools
Debian/Ubuntu/Mint: `$ sudo apt-get install build-essential libxmu-dev libxi-dev libgl-dev cmake git`
RedHat/CentOS/Fedora: `$ sudo yum install libXmu-devel libXi-devel libGL-devel cmake git`
##### Build
$ cd build
$ cmake ./cmake
$ make -j4
| Target | Description |
| ---------- | ----------- |
| glew | Build the glew shared library. |
| glew_s | Build the glew static library. |
| glewinfo | Build the `glewinfo` executable (requires `BUILD_UTILS` to be `ON`). |
| visualinfo | Build the `visualinfo` executable (requires `BUILD_UTILS` to be `ON`). |
| install | Install all enabled targets into `CMAKE_INSTALL_PREFIX`. |
| clean | Clean up build artifacts. |
| all | Build all enabled targets (default target). |
| Variables | Description |
| --------------- | ----------- |
| BUILD_UTILS | Build the `glewinfo` and `visualinfo` executables. |
| GLEW_REGAL | Build in Regal mode. |
| GLEW_OSMESA | Build in off-screen Mesa mode. |
| BUILD_FRAMEWORK | Build as MacOSX Framework. Setting `CMAKE_INSTALL_PREFIX` to `/Library/Frameworks` is recommended. |
### Windows
#### Visual Studio
Use the provided Visual Studio project file in build/vc15/
Projects for vc6, vc10, vc12 and vc14 are also provided
#### MSYS/Mingw
Available from [Mingw](http://www.mingw.org/)
Requirements: bash, make, gcc
$ mingw32-make
$ mingw32-make install
$ mingw32-make install.all
Alternative toolchain: `SYSTEM=mingw-win32`
#### MSYS2/Mingw-w64
Available from [Msys2](http://msys2.github.io/) and/or [Mingw-w64](http://mingw-w64.org/)
Requirements: bash, make, gcc
$ pacman -S gcc make mingw-w64-i686-gcc mingw-w64-x86_64-gcc
$ make
$ make install
$ make install.all
Alternative toolchain: `SYSTEM=msys, SYSTEM=msys-win32, SYSTEM=msys-win64`
## glewinfo
`glewinfo` is a command-line tool useful for inspecting the capabilities of an
OpenGL implementation and GLEW support for that. Please include `glewinfo.txt`
with bug reports, as appropriate.