Compare commits

..

No commits in common. "master" and "glew-2.3.0" have entirely different histories.

24 changed files with 253 additions and 87914 deletions

View File

@ -1,227 +0,0 @@
name: CMake
on:
pull_request:
branches:
- master
types:
- opened
- synchronize
- reopened
push:
branches:
- master
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
jobs:
build:
runs-on: ubuntu-latest
container: ubuntu:latest
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: apt update && DEBIAN_FRONTEND=noninteractive apt install -y cmake gcc g++ libglu1-mesa-dev pkg-config libx11-dev libxext-dev
- name: Create Build Environment
# Some projects don't allow in-source building, so create a separate build directory
# We'll use this as our working directory for all subsequent commands
run: |
mkdir build_test
mkdir from_installed
mkdir pkg-config
mkdir as_subdirectory
- name: Configure CMake
# Use a bash shell so we can use the same syntax for environment variable
# access regardless of the host operating system
shell: bash
working-directory: build_test
# Note the current convention is to use the -S and -B options here to specify source
# and build directories, but this is only available with CMake 3.13 and higher.
# The CMake binaries on the Github Actions machines are (as of this writing) 3.12
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE
- name: Build test
working-directory: build_test
shell: bash
# Execute the build. You can specify a specific target with "--target <NAME>"
run: cmake --build . --config $BUILD_TYPE
- name: Install test
shell: bash
working-directory: from_installed
run: |
mkdir -p ext_project/build
cp $GITHUB_WORKSPACE/src/glewinfo.c ext_project/
cmake $GITHUB_WORKSPACE -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/glew-root-cmake
cmake --build . --target install
cd ext_project
cp $GITHUB_WORKSPACE/glew-cmake/cmake-install-test.cmake CMakeLists.txt
cmake -DCMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/glew-root-cmake/ .
cmake --build .
- name: Package config test
shell: bash
working-directory: pkg-config
run: |
mkdir -p ext_project
cp $GITHUB_WORKSPACE/src/glewinfo.c ext_project/
cmake $GITHUB_WORKSPACE -DPKG_CONFIG_REPRESENTATIVE_TARGET=libglew_static -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/glew-root-pkg-config
cmake --build . --target install
cd ext_project
gcc $GITHUB_WORKSPACE/src/glewinfo.c $(PKG_CONFIG_PATH=$GITHUB_WORKSPACE/glew-root-pkg-config/lib/pkgconfig pkg-config --libs --cflags glew) -o glewinfo
- name: Subdirectory test
shell: bash
working-directory: as_subdirectory
run: |
cp $GITHUB_WORKSPACE/src/glewinfo.c ./
cp $GITHUB_WORKSPACE/glew-cmake/sub-directory-test.cmake CMakeLists.txt
cmake .
cmake --build .
build_linux:
strategy:
fail-fast: false
matrix:
cmake:
- 2.8.12.2
- 3.10.3
- latest
runs-on: ubuntu-latest
container: ubuntu:latest
steps:
- uses: actions/checkout@v2
- name: Restore cached cmake
uses: actions/cache/restore@v4
with:
path: /opt/cmake
key: cmake-${{ matrix.cmake }}
- name: Install dependencies
shell: bash
run: |
cmake=${{ matrix.cmake }}
apt update
apt install -y gcc make libgl1-mesa-dev libx11-dev libxext-dev
if [ "${cmake}" == "latest" ]; then
apt install -y git
cmake=$(git ls-remote --tags https://gitlab.kitware.com/cmake/cmake | cut -f 2 | sed -E "s/^refs\/tags\/v//" | tr -d "^{}" | sort -t '.' -k 1,1n -k 2,2n -k 3,3n | tail -n 1 | tr -d "\n")
echo "Latest version: ${cmake}"
fi
if [ -x /opt/cmake/bin/cmake ]; then
echo "Found cached cmake"
if [ -n "$(/opt/cmake/bin/cmake --version | grep ${cmake})" ]; then
exit 0
fi
/opt/cmake/bin/cmake --version
echo "CMake version is mismatched"
rm -rf /opt/cmake
fi
apt install -y g++ wget
short_version=$(echo "${cmake}" | sed -E "s/^([0-9]+\\.[0-9]+)\\..+$/\\1/" | tr -d "\n")
wget https://cmake.org/files/v${short_version}/cmake-${cmake}.tar.gz
tar -xf cmake-${cmake}.tar.gz
cd cmake-${cmake}
if [ "${cmake}" == "2.8.12.2" ]; then
apt -y install patch
patch -p1 << 'EOF'
--- cmake-2.8.12.2-org/CMakeLists.txt 2014-01-16 17:15:07.000000000 +0000
+++ cmake-2.8.12.2-patch/CMakeLists.txt 2025-04-13 10:37:28.359021847 +0000
@@ -616 +616 @@
-add_subdirectory(Tests)
+# add_subdirectory(Tests)
--- cmake-2.8.12.2-org/Source/CMakeLists.txt 2014-01-16 17:15:08.000000000 +0000
+++ cmake-2.8.12.2-patch/Source/CMakeLists.txt 2025-04-13 10:37:13.584956375 +0000
@@ -481,2 +481,2 @@
-add_library(CTestLib ${CTEST_SRCS})
-target_link_libraries(CTestLib CMakeLib ${CMAKE_CURL_LIBRARIES} ${CMAKE_XMLRPC_LIBRARIES})
+# add_library(CTestLib ${CTEST_SRCS})
+# target_link_libraries(CTestLib CMakeLib ${CMAKE_CURL_LIBRARIES} ${CMAKE_XMLRPC_LIBRARIES})
@@ -562,2 +562,2 @@
-add_executable(ctest ctest.cxx)
-target_link_libraries(ctest CTestLib)
+# add_executable(ctest ctest.cxx)
+# target_link_libraries(ctest CTestLib)
@@ -583 +583 @@
-install(TARGETS cmake ctest cpack DESTINATION bin)
+install(TARGETS cmake cpack DESTINATION bin)
EOF
fi
./configure --prefix=/opt/cmake -- -DCMAKE_USE_OPENSSL=OFF
make -j $(nproc) install
- name: Save cmake
uses: actions/cache/save@v4
with:
path: /opt/cmake
key: cmake-${{ matrix.cmake }}
- name: Configure CMake
shell: bash
run: /opt/cmake/bin/cmake . -DCMAKE_BUILD_TYPE=$BUILD_TYPE
- name: Build test
shell: bash
run: /opt/cmake/bin/cmake --build .
- name: Check alias
shell: bash
run: test -e lib/libGLEW.a
build_mingw:
runs-on: ubuntu-latest
container: ubuntu:latest
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: apt update && apt install -y cmake g++-mingw-w64-x86-64 make libgl1-mesa-dev libx11-dev libxext-dev
- name: Configure CMake
shell: bash
run: cmake . -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_TOOLCHAIN_FILE="$GITHUB_WORKSPACE/glew-cmake/mingw.cmake"
- name: Build test
shell: bash
run: cmake --build .
build_mac:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Configure CMake
shell: bash
run: cmake . -DCMAKE_BUILD_TYPE=$BUILD_TYPE
- name: Build test
shell: bash
run: cmake --build .
build_windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Configure CMake
shell: bash
run: cmake . -DCMAKE_BUILD_TYPE=$BUILD_TYPE
- name: Build test
shell: bash
run: cmake --build .

View File

@ -1,287 +0,0 @@
cmake_minimum_required(VERSION 2.8.12...4.0)
file(STRINGS ${CMAKE_CURRENT_SOURCE_DIR}/config/version _VERSION_MAJOR_STRING REGEX "GLEW_MAJOR[ ]*=[ ]*[0-9]+.*")
string(REGEX REPLACE "GLEW_MAJOR[ ]*=[ ]*([0-9]+)" "\\1" MAJOR_VERSION ${_VERSION_MAJOR_STRING})
file(STRINGS ${CMAKE_CURRENT_SOURCE_DIR}/config/version _VERSION_MINOR_STRING REGEX "GLEW_MINOR[ ]*=[ ]*[0-9]+.*")
string(REGEX REPLACE "GLEW_MINOR[ ]*=[ ]*([0-9]+)" "\\1" MINOR_VERSION ${_VERSION_MINOR_STRING})
file(STRINGS ${CMAKE_CURRENT_SOURCE_DIR}/config/version _VERSION_PATCH_STRING REGEX "GLEW_MICRO[ ]*=[ ]*[0-9]+.*")
string(REGEX REPLACE "GLEW_MICRO[ ]*=[ ]*([0-9]+)" "\\1" PATCH_VERSION ${_VERSION_PATCH_STRING})
set(GLEW_VERSION ${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION})
if(NOT CMAKE_VERSION VERSION_LESS 3.0)
cmake_policy(SET CMP0048 NEW)
project("glew" VERSION ${GLEW_VERSION} LANGUAGES C)
else()
project("glew" C)
set(CPACK_PACKAGE_VERSION_MAJOR ${MAJOR_VERSION})
set(CPACK_PACKAGE_VERSION_MINOR ${MAJOR_VERSION})
set(CPACK_PACKAGE_VERSION_PATCH ${MAJOR_VERSION})
endif()
set(SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src)
set(INCLUDE_DIR "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>$<INSTALL_INTERFACE:include>")
set(RC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/build)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin)
include("GeneratePkgConfig.cmake")
if (POLICY CMP0077)
cmake_policy(SET CMP0077 NEW)
endif()
option(glew-cmake_BUILD_SHARED "Build the shared glew library" ON)
option(glew-cmake_BUILD_STATIC "Build the static glew library" ON)
option(USE_GLU "Use GLU" OFF)
option(GLEW_OSMESA "Off-screen Mesa mode" OFF)
option(PKG_CONFIG_REPRESENTATIVE_TARGET "Generate pc file for specified target as glew. libglew_static|libglew_shared" OFF)
option(ONLY_LIBS "Do not build executables" OFF)
set(LIBGLEW_SRCS ${SRC_DIR}/glew.c)
set(DEFINITIONS)
if(WIN32)
list(APPEND DEFINITIONS -DWIN32_MEAN_AND_LEAN -DVC_EXTRALEAN -D_CRT_SECURE_NO_WARNINGS)
endif()
if(MSVC)
list(APPEND LIBGLEW_SRCS ${RC_DIR}/glew.rc)
endif()
# Use namespaced libraries when supported
if(NOT CMAKE_VERSION VERSION_LESS 3.14)
set(USE_NAMESPACED_LIB YES)
else()
set(USE_NAMESPACED_LIB NO)
endif()
if(POLICY CMP0028)
cmake_policy(SET CMP0028 NEW)
endif()
if(POLICY CMP0042)
cmake_policy(SET CMP0042 NEW)
endif()
if(POLICY CMP0072)
set(OpenGL_GL_PREFERENCE GLVND)
endif()
if(NOT (WIN32 OR APPLE))
message("Try to find OpenGL with GLVND")
find_package(OpenGL REQUIRED
COMPONENTS OpenGL GLX)
endif()
if(OPENGL_FOUND AND OpenGL_GLX_FOUND AND TARGET OpenGL::OpenGL)
set(USE_GLVND YES)
else()
message("GLVND not supported. Try find OpenGL legacy")
find_package(OpenGL REQUIRED)
set(USE_GLVND NO)
endif()
set(pc_requires)
if(NOT USE_GLU)
list(APPEND DEFINITIONS -DGLEW_NO_GLU)
else()
if(NOT OPENGL_GLU_FOUND)
message(FATAL_ERROR "GLU is not found. but GLU option is enabled")
endif()
list(APPEND pc_requires glu)
if(USE_NAMESPACED_LIB)
list(APPEND LIBRARIES OpenGL::GLU)
else()
list(APPEND LIBRARIES ${OPENGL_glu_LIBRARY})
endif()
endif()
list(APPEND pc_requires gl)
if(USE_NAMESPACED_LIB)
if(USE_GLVND)
list(APPEND LIBRARIES OpenGL::OpenGL)
else()
list(APPEND LIBRARIES OpenGL::GL)
endif()
else()
if(USE_GLVND)
list(APPEND LIBRARIES ${OPENGL_opengl_LIBRARY})
else()
list(APPEND LIBRARIES ${OPENGL_gl_LIBRARY})
endif()
endif()
# OS Specific dependencies
if(APPLE)
find_library(AGL_LIBRARY AGL REQUIRED)
list(APPEND LIBRARIES ${AGL_LIBRARY})
elseif(NOT WIN32)
if(GLEW_OSMESA)
find_library(OSMESA_LIBRARY OSMesa REQUIRED)
list(APPEND LIBRARIES ${OSMESA_LIBRARY})
list(APPEND DEFINITIONS -DGLEW_OSMESA)
list(APPEND pc_requires osmesa)
else()
if(USE_GLVND)
if(NOT OpenGL_GLX_FOUND)
message(FATAL_ERROR "GLX is not found. Try with PREFER_GLVND=NO")
endif()
if(USE_NAMESPACED_LIB)
list(APPEND LIBRARIES OpenGL::GLX)
else()
list(APPEND LIBRARIES ${OPENGL_glx_LIBRARY})
endif()
endif()
find_package(X11 REQUIRED)
list(APPEND pc_requires x11 xext)
if(USE_NAMESPACED_LIB)
list(APPEND LIBRARIES X11::X11 X11::Xext)
else()
list(APPEND LIBRARIES ${X11_X11_LIB} ${X11_Xext_LIB})
endif()
endif()
endif()
set(GLEW_TARGETS)
if(NOT CMAKE_INSTALL_LIBDIR)
set(INSTALL_LIBDIR lib)
else()
set(INSTALL_LIBDIR ${CMAKE_INSTALL_LIBDIR})
endif()
execute_process(
COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_BINARY_DIR}/test_fs_support_case_sensitivity
COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_BINARY_DIR}/test_fs_support_CASE_sensitivity)
file(GLOB TEST_FILE_LIST ${CMAKE_BINARY_DIR}/test_fs_support_*_sensitivity)
list(LENGTH TEST_FILE_LIST TEST_FILE_COUNT)
if(TEST_FILE_COUNT EQUAL 2)
set(SUPPORT_CASE_SENSITIVE_FS YES)
else()
set(SUPPORT_CASE_SENSITIVE_FS NO)
endif()
function(set_representative_target TARGET)
set_target_properties(${TARGET} PROPERTIES
OUTPUT_NAME "glew"
DEBUG_POSTFIX d)
# Windows & macOS use case-insensetive FS. do not create symbolic link
if(SUPPORT_CASE_SENSITIVE_FS)
get_target_property(TARGET_TYPE ${TARGET} TYPE)
string(TOLOWER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_LOWER)
if(CMAKE_BUILD_TYPE_LOWER STREQUAL "debug" AND NOT ANDROID)
set(GLEW_DEBUG_SUFFIX "d")
else()
set(GLEW_DEBUG_SUFFIX "")
endif()
if(TARGET_TYPE STREQUAL STATIC_LIBRARY)
set(EXT ".a")
get_target_property(OUT_DIR ${TARGET} ARCHIVE_OUTPUT_DIRECTORY)
else()
set(EXT ".so")
get_target_property(OUT_DIR ${TARGET} LIBRARY_OUTPUT_DIRECTORY)
endif()
if(NOT ${CMAKE_VERSION} VERSION_LESS 3.0)
add_custom_command(TARGET ${TARGET} POST_BUILD
COMMAND ${CMAKE_COMMAND} ARGS -E create_symlink libglew${GLEW_DEBUG_SUFFIX}${EXT} libGLEW${GLEW_DEBUG_SUFFIX}${EXT}
WORKING_DIRECTORY ${OUT_DIR}
BYPRODUCTS ${OUT_DIR}/libGLEW${GLEW_DEBUG_SUFFIX}${EXT}
COMMENT "create libGLEW${GLEW_DEBUG_SUFFIX} symbolic link")
else()
add_custom_command(TARGET ${TARGET} POST_BUILD
COMMAND bash ARGS -c "( test ! -e ${OUT_DIR}/libGLEW${GLEW_DEBUG_SUFFIX}${EXT} && cd ${OUT_DIR} && ${CMAKE_COMMAND} -E create_symlink libglew${GLEW_DEBUG_SUFFIX}${EXT} libGLEW${GLEW_DEBUG_SUFFIX}${EXT} ) || true"
COMMENT "create libGLEW${GLEW_DEBUG_SUFFIX} symbolic link"
VERBATIM)
endif()
if(NOT ${CMAKE_VERSION} VERSION_LESS 3.14)
install(FILES ${OUT_DIR}/libGLEW${GLEW_DEBUG_SUFFIX}${EXT} TYPE LIB)
else()
install(FILES ${OUT_DIR}/libGLEW${GLEW_DEBUG_SUFFIX}${EXT} DESTINATION ${INSTALL_LIBDIR})
endif()
endif()
endfunction()
if(glew-cmake_BUILD_STATIC)
add_library(libglew_static STATIC ${LIBGLEW_SRCS})
set_representative_target(libglew_static)
target_compile_definitions(libglew_static PUBLIC GLEW_STATIC)
list(APPEND GLEW_TARGETS libglew_static)
endif()
if(glew-cmake_BUILD_SHARED)
add_library(libglew_shared SHARED ${LIBGLEW_SRCS})
if(glew-cmake_BUILD_STATIC)
set_target_properties(libglew_shared PROPERTIES
OUTPUT_NAME "glew-shared"
DEBUG_POSTFIX d)
else()
set_representative_target(libglew_shared)
endif()
target_compile_definitions(libglew_shared PRIVATE GLEW_BUILD)
if(MINGW)
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.13)
target_link_options(libglew_shared PRIVATE -nostdlib)
else()
target_link_libraries(libglew_shared PRIVATE -nostdlib)
endif()
endif()
list(APPEND GLEW_TARGETS libglew_shared)
endif()
foreach(GLEW_TARGET ${GLEW_TARGETS})
target_compile_definitions(${GLEW_TARGET} PUBLIC ${DEFINITIONS})
target_include_directories(${GLEW_TARGET} PUBLIC ${INCLUDE_DIR})
target_link_libraries(${GLEW_TARGET} PUBLIC ${LIBRARIES})
set_target_properties(${GLEW_TARGET} PROPERTIES VERSION ${GLEW_VERSION})
endforeach()
if(PKG_CONFIG_REPRESENTATIVE_TARGET)
GeneratePkgConfigFile(${PKG_CONFIG_REPRESENTATIVE_TARGET} "The OpenGL Extension Wrangler library"
NAME "glew"
LIBRARY_DIR ${INSTALL_LIBDIR}
REQUIRES ${pc_requires})
endif()
install(TARGETS ${GLEW_TARGETS} EXPORT glew-cmake
ARCHIVE DESTINATION ${INSTALL_LIBDIR}
LIBRARY DESTINATION ${INSTALL_LIBDIR})
install(EXPORT glew-cmake DESTINATION ${INSTALL_LIBDIR}/cmake/glew FILE glewConfig.cmake)
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()

View File

@ -1,62 +0,0 @@
function(GeneratePkgConfigFile target description)
cmake_parse_arguments(pc "" "NAME;LIBRARY_DIR" "REQUIRES" ${ARGV})
if(NOT pc_LIBRARY_DIR)
set(pc_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR})
endif()
if(WIN32)
set(PKGCONFIG_INSTALL_DIR)
else()
set(PKGCONFIG_INSTALL_DIR ${pc_LIBRARY_DIR}/pkgconfig)
endif()
if(NOT pc_NAME)
set(pc_NAME ${target})
endif()
get_property(raw_definitions TARGET ${target} PROPERTY INTERFACE_COMPILE_DEFINITIONS)
set(definitions "")
foreach(def IN LISTS raw_definitions)
if(def MATCHES "-D")
list(APPEND definitions ${def})
else()
list(APPEND definitions "-D${def}")
endif()
endforeach()
list(JOIN definitions " " definitions)
get_property(target_output TARGET ${target} PROPERTY OUTPUT_NAME)
get_filename_component(target_output ${target_output} NAME)
set(links "-l${target_output}")
get_property(raw_links TARGET ${target} PROPERTY INTERFACE_LINK_LIBRARIES)
foreach(link IN LISTS raw_links)
if(link MATCHES "-l")
list(APPEND links ${link})
elseif(TARGET ${link})
get_property(is_imported TARGET ${link} PROPERTY IMPORTED)
if(NOT is_imported)
get_property(link_target TARGET ${link} PROPERTY OUTPUT_NAME)
list(APPEND links ${link_target})
endif()
else()
list(APPEND links "-l${link}")
endif()
endforeach()
list(JOIN links " " links)
get_property(version TARGET ${target} PROPERTY VERSION)
set(out_file "${CMAKE_CURRENT_BINARY_DIR}/${pc_NAME}.pc")
file(WRITE ${out_file} "prefix=${CMAKE_INSTALL_PREFIX}\n")
file(APPEND ${out_file} "exec_prefix=\${prefix}\n")
file(APPEND ${out_file} "libdir=\${prefix}/${pc_LIBRARY_DIR}\n")
file(APPEND ${out_file} "includedir=\${prefix}/include\n")
file(APPEND ${out_file} "\n")
file(APPEND ${out_file} "Name: ${pc_NAME}\n")
file(APPEND ${out_file} "Description: ${description}\n")
file(APPEND ${out_file} "Version: ${version}\n")
file(APPEND ${out_file} "Cflags: -I\${includedir} ${definitions}\n")
file(APPEND ${out_file} "Libs: -L\${libdir} ${links}\n")
if(pc_REQUIRES)
string(REPLACE ";" " " REQUIRES "${pc_REQUIRES}")
file(APPEND ${out_file} "Requires: ${REQUIRES}")
endif()
install(FILES ${out_file} DESTINATION "${PKGCONFIG_INSTALL_DIR}")
endfunction()

262
README.md
View File

@ -1,29 +1,255 @@
# GLEW-cmake - nightly pre-generated snapshot with old unofficial cmake support
# GLEW - The OpenGL Extension Wrangler Library
[GLEW](https://github.com/nigels-com/glew) is upstream of this project.
But *GLEW* repository does not contain generated sources. Only releases include generated sources.
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.
*GLEW-cmake* has generated sources based on the latest *GLEW*. Sources are generated nightly.
If you need only the latest snapshot of *GLEW*, try the build system of *GLEW*. It is placed under the `build` directory. Official `CMakeLists.txt` is placed in `build/cmake`.
Please check [README_glew.md](./README_glew.md) for using build system of *GLEW*.
![](http://glew.sourceforge.net/glew.png)
Also, *GLEW-cmake* has unofficial cmake support - It is created when the official CMake support of *GLEW* does not exist.
You can see some CMake script examples in [`glew-cmake`](./glew-cmake/) directory. But, I **strongly** recommend using official CMakeLists of *GLEW*.
http://glew.sourceforge.net/
## Usage
https://github.com/nigels-com/glew
This project provide `libglew_static` and `libglew_shared` library targets and `glewinfo` and `visualinfo` executable targets.
[![Download](https://img.shields.io/sourceforge/dm/glew.svg)](https://sourceforge.net/projects/glew/files/latest/download)
[![Health](https://codebuild.ap-southeast-2.amazonaws.com/badges?uuid=eyJlbmNyeXB0ZWREYXRhIjoiZ0cxMFNORFBPTGQ5Z1MyRUsxRnU5V1ZyOUNUWmZZRFJwNWdBNng5MnNtdFFObGNsTEJkQkxZa0lHYmtMNEZRREZaZmdvMUh2bDMxVjhFc3c2L29odFQ4PSIsIml2UGFyYW1ldGVyU3BlYyI6InhLVlFqWXVaMEZRVFh6c1QiLCJtYXRlcmlhbFNldFNlcmlhbCI6MX0%3D&branch=master)](https://ap-southeast-2.codebuild.aws.amazon.com/project/eyJlbmNyeXB0ZWREYXRhIjoiK3RLWndGOVVkMWthbXRQZCtVTTNOQ0w2dEpxakZ1cVBTNDZ1UldGODdqUERSdkx0U21Nd0RFaGhQL1kycVlmNzh2OXpEYnRKV3hXTVJJdjUvVStCbTl0dkliZm5jRTFsc0VBPSIsIml2UGFyYW1ldGVyU3BlYyI6ImZ0ekRoMkNjaU0rRUt5K2UiLCJtYXRlcmlhbFNldFNlcmlhbCI6MX0%3D)
`libglew_static` provides a static library, and `libglew_shared` provides a shared library.
*glew-cmake* does not affected by [BUILD_SHARED_LIBS](https://cmake.org/cmake/help/latest/variable/BUILD_SHARED_LIBS.html).
## Table of Contents
You can disable each library target by setting `glew-cmake_BUILD_SHARED` or `glew-cmake_BUILD_STATIC` falsy value (ex. `NO`, `FALSE`).
* [Downloads](#downloads)
* [Recent snapshots](#recent-snapshots)
* [Build](#build)
* [Linux and Mac](#linux-and-mac)
* [Using GNU Make](#using-gnu-make)
* [Install build tools](#install-build-tools)
* [Build](#build-1)
* [Linux EGL](#linux-egl)
* [Linux OSMesa](#linux-osmesa)
* [Linux mingw-w64](#linux-mingw-w64)
* [Using cmake](#using-cmake)
* [Install build tools](#install-build-tools-1)
* [Build](#build-2)
* [Windows](#windows)
* [Visual Studio](#visual-studio)
* [MSYS/Mingw](#msysmingw)
* [MSYS2/Mingw-w64](#msys2mingw-w64)
* [glewinfo](#glewinfo)
* [Code Generation](#code-generation)
* [Authors](#authors)
* [Contributions](#contributions)
* [Copyright and Licensing](#copyright-and-licensing)
If you need only libraries, Please set `ONLY_LIBS` to `ON`. Otherwise, cmake generates executable targets also.
## Downloads
You can get pkg-config fils by setting `PKG_CONFIG_REPRESENTATIVE_TARGET` to `libglew_static` or `libglew_shared`.
Current release is [2.3.0](https://github.com/nigels-com/glew/releases/tag/glew-2.3.0).
[(Change Log)](http://glew.sourceforge.net/log.html)
Simply specify dependency of your target with `libglew_static` or `libglew_shared` by `target_link_libraries`.
It will set the additional include directory & the libraries to link to your target.
Sources available as
[ZIP](https://github.com/nigels-com/glew/releases/download/glew-2.3.0/glew-2.3.0.zip) or
[TGZ](https://github.com/nigels-com/glew/releases/download/glew-2.3.0/glew-2.3.0.tgz).
If you are not familiar with cmake, Some `sub-directory-test.cmake`, `fetch-content.cmake` in [`glew-cmake`](./glew-cmake/) could be helpful.
Windows binaries for [32-bit and 64-bit](https://github.com/nigels-com/glew/releases/download/glew-2.3.0/glew-2.3.0-win32.zip).
### Recent snapshots
Snapshots may contain new features, bug-fixes or new OpenGL extensions ahead of tested, official releases.
[glew-20220402.tgz](https://sourceforge.net/projects/glew/files/glew/snapshots/glew-20220402.tgz/download) *GLEW 2.2.0 - with fix for glCreateProgressFenceNVX*
## 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.
The code generation is known to work on Windows using [MSYS2](https://www.msys2.org/).
For most end-users of GLEW the official releases are the best choice, with first class support.
### Linux and Mac
#### Using GNU Make
GNU make is the primary build system for GLEW, historically.
It includes targets for building the sources and headers, for maintenance purposes.
##### 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: you may need to call `make` in the **auto** folder first_
##### 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
The cmake build is mostly contributor maintained.
Due to the multitude of use cases this is maintained on a _best effort_ basis.
Pull requests are welcome.
*CMake 3.16 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.
---------------------------
GLEW Extension Info
---------------------------
GLEW version 2.0.0
Reporting capabilities of pixelformat 3
Running on a Intel(R) HD Graphics 3000 from Intel
OpenGL version 3.1.0 - Build 9.17.10.4229 is supported
GL_VERSION_1_1: OK
---------------
GL_VERSION_1_2: OK
---------------
glCopyTexSubImage3D: OK
glDrawRangeElements: OK
glTexImage3D: OK
glTexSubImage3D: OK
...
## Code Generation
A Unix or Mac environment is needed for building GLEW from scratch to
include new extensions, or customize the code generation. The extension
data is regenerated from the top level source directory with:
make extensions
An alternative to generating the GLEW sources from scratch is to
download a pre-generated (unsupported) snapshot:
https://sourceforge.net/projects/glew/files/glew/snapshots/
## Authors
GLEW is currently maintained by [Nigel Stewart](https://github.com/nigels-com)
with bug fixes, new OpenGL extension support and new releases.
GLEW was developed by [Milan Ikits](http://www.cs.utah.edu/~ikits/)
and [Marcelo Magallon](http://wwwvis.informatik.uni-stuttgart.de/~magallon/).
Aaron Lefohn, Joe Kniss, and Chris Wyman were the first users and also
assisted with the design and debugging process.
The acronym GLEW originates from Aaron Lefohn.
Pasi K&auml;rkk&auml;inen identified and fixed several problems with
GLX and SDL. Nate Robins created the `wglinfo` utility, to
which modifications were made by Michael Wimmer.
## Contributions
GLEW welcomes community contributions. Typically these are co-ordinated
via [Issues](https://github.com/nigels-com/glew/issues) or
[Pull Requests](https://github.com/nigels-com/glew/pulls) in the
GitHub web interface.
Be sure to mention platform and compiler toolchain details when filing
a bug report. The output of `glewinfo` can be quite useful for discussion
also.
Generally GLEW is usually released once a year, around the time of the Siggraph
computer graphics conference. If you're not using the current release
version of GLEW, be sure to check if the issue or bug is fixed there.
## Copyright and Licensing
GLEW is originally derived from the EXTGL project by Lev Povalahev.
The source code is licensed under the
[Modified BSD License](http://glew.sourceforge.net/glew.txt), the
[Mesa 3-D License](http://glew.sourceforge.net/mesa.txt) (MIT) and the
[Khronos License](http://glew.sourceforge.net/khronos.txt) (MIT).
The automatic code generation scripts are released under the
[GNU GPL](http://glew.sourceforge.net/gpl.txt).

View File

@ -1,249 +0,0 @@
# 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
[![Download](https://img.shields.io/sourceforge/dm/glew.svg)](https://sourceforge.net/projects/glew/files/latest/download)
[![Health](https://codebuild.ap-southeast-2.amazonaws.com/badges?uuid=eyJlbmNyeXB0ZWREYXRhIjoiZ0cxMFNORFBPTGQ5Z1MyRUsxRnU5V1ZyOUNUWmZZRFJwNWdBNng5MnNtdFFObGNsTEJkQkxZa0lHYmtMNEZRREZaZmdvMUh2bDMxVjhFc3c2L29odFQ4PSIsIml2UGFyYW1ldGVyU3BlYyI6InhLVlFqWXVaMEZRVFh6c1QiLCJtYXRlcmlhbFNldFNlcmlhbCI6MX0%3D&branch=master)](https://ap-southeast-2.codebuild.aws.amazon.com/project/eyJlbmNyeXB0ZWREYXRhIjoiK3RLWndGOVVkMWthbXRQZCtVTTNOQ0w2dEpxakZ1cVBTNDZ1UldGODdqUERSdkx0U21Nd0RFaGhQL1kycVlmNzh2OXpEYnRKV3hXTVJJdjUvVStCbTl0dkliZm5jRTFsc0VBPSIsIml2UGFyYW1ldGVyU3BlYyI6ImZ0ekRoMkNjaU0rRUt5K2UiLCJtYXRlcmlhbFNldFNlcmlhbCI6MX0%3D)
## Table of Contents
* [Downloads](#downloads)
* [Recent snapshots](#recent-snapshots)
* [Build](#build)
* [Linux and Mac](#linux-and-mac)
* [Using GNU Make](#using-gnu-make)
* [Install build tools](#install-build-tools)
* [Build](#build-1)
* [Linux EGL](#linux-egl)
* [Linux OSMesa](#linux-osmesa)
* [Linux mingw-w64](#linux-mingw-w64)
* [Using cmake](#using-cmake)
* [Install build tools](#install-build-tools-1)
* [Build](#build-2)
* [Windows](#windows)
* [Visual Studio](#visual-studio)
* [MSYS/Mingw](#msysmingw)
* [MSYS2/Mingw-w64](#msys2mingw-w64)
* [glewinfo](#glewinfo)
* [Code Generation](#code-generation)
* [Authors](#authors)
* [Contributions](#contributions)
* [Copyright and Licensing](#copyright-and-licensing)
## Downloads
Current release is [2.3.0](https://github.com/nigels-com/glew/releases/tag/glew-2.3.0).
[(Change Log)](http://glew.sourceforge.net/log.html)
Sources available as
[ZIP](https://github.com/nigels-com/glew/releases/download/glew-2.3.0/glew-2.3.0.zip) or
[TGZ](https://github.com/nigels-com/glew/releases/download/glew-2.3.0/glew-2.3.0.tgz).
Windows binaries for [32-bit and 64-bit](https://github.com/nigels-com/glew/releases/download/glew-2.3.0/glew-2.3.0-win32.zip).
## 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.
The code generation is known to work on Windows using [MSYS2](https://www.msys2.org/).
For most end-users of GLEW the official releases are the best choice, with first class support.
### Linux and Mac
#### Using GNU Make
GNU make is the primary build system for GLEW, historically.
It includes targets for building the sources and headers, for maintenance purposes.
##### 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: you may need to call `make` in the **auto** folder first_
##### 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
The cmake build is mostly contributor maintained.
Due to the multitude of use cases this is maintained on a _best effort_ basis.
Pull requests are welcome.
*CMake 3.16 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.
---------------------------
GLEW Extension Info
---------------------------
GLEW version 2.0.0
Reporting capabilities of pixelformat 3
Running on a Intel(R) HD Graphics 3000 from Intel
OpenGL version 3.1.0 - Build 9.17.10.4229 is supported
GL_VERSION_1_1: OK
---------------
GL_VERSION_1_2: OK
---------------
glCopyTexSubImage3D: OK
glDrawRangeElements: OK
glTexImage3D: OK
glTexSubImage3D: OK
...
## Code Generation
A Unix or Mac environment is needed for building GLEW from scratch to
include new extensions, or customize the code generation. The extension
data is regenerated from the top level source directory with:
make extensions
An alternative to generating the GLEW sources from scratch is to
download a pre-generated (unsupported) snapshot:
https://sourceforge.net/projects/glew/files/glew/snapshots/
## Authors
GLEW is currently maintained by [Nigel Stewart](https://github.com/nigels-com)
with bug fixes, new OpenGL extension support and new releases.
GLEW was developed by [Milan Ikits](http://www.cs.utah.edu/~ikits/)
and [Marcelo Magallon](http://wwwvis.informatik.uni-stuttgart.de/~magallon/).
Aaron Lefohn, Joe Kniss, and Chris Wyman were the first users and also
assisted with the design and debugging process.
The acronym GLEW originates from Aaron Lefohn.
Pasi K&auml;rkk&auml;inen identified and fixed several problems with
GLX and SDL. Nate Robins created the `wglinfo` utility, to
which modifications were made by Michael Wimmer.
## Contributions
GLEW welcomes community contributions. Typically these are co-ordinated
via [Issues](https://github.com/nigels-com/glew/issues) or
[Pull Requests](https://github.com/nigels-com/glew/pulls) in the
GitHub web interface.
Be sure to mention platform and compiler toolchain details when filing
a bug report. The output of `glewinfo` can be quite useful for discussion
also.
Generally GLEW is usually released once a year, around the time of the Siggraph
computer graphics conference. If you're not using the current release
version of GLEW, be sure to check if the issue or bug is fixed there.
## Copyright and Licensing
GLEW is originally derived from the EXTGL project by Lev Povalahev.
The source code is licensed under the
[Modified BSD License](http://glew.sourceforge.net/glew.txt), the
[Mesa 3-D License](http://glew.sourceforge.net/mesa.txt) (MIT) and the
[Khronos License](http://glew.sourceforge.net/khronos.txt) (MIT).
The automatic code generation scripts are released under the
[GNU GPL](http://glew.sourceforge.net/gpl.txt).

View File

@ -66,7 +66,7 @@ The latest release contains support for OpenGL 4.6, compatibility and forward-co
<h2>News</h2>
<ul>
<li>[12-27-2025] <a href="https://github.com/nigels-com/glew/releases/tag/glew-2.3.0">GLEW 2.3.0</a> new extensions and minor bug fixes</li>
<li>[06-27-2025] <a href="https://github.com/nigels-com/glew/releases/tag/glew-2.3.0">GLEW 2.3.0</a> new extensions and minor bug fixes</li>
<li>[03-15-2020] <a href="https://github.com/nigels-com/glew/releases/tag/glew-2.2.0">GLEW 2.2.0</a> new extensions and minor bug fixes</li>
<li>[07-31-2017] <a href="https://github.com/nigels-com/glew/releases/tag/glew-2.1.0">GLEW 2.1.0</a> adds support for OpenGL 4.6, new extensions and minor bug fixes</li>
<li>[07-24-2016] <a href="https://github.com/nigels-com/glew/releases/tag/glew-2.0.0">GLEW 2.0.0</a> adds support for forward-compatible contexts, adds new extensions, OSMesa and EGL support, MX discontinued and minor bug fixes</li>

View File

@ -1,22 +0,0 @@
schedules:
- cron: "0 0 * * *"
displayName: Daily midnight build
branches:
include:
- master
always: true
jobs:
- job: NightlyUpdate
pool:
vmImage: 'ubuntu-latest'
container: perlmint/glew-cmake:20190922
steps:
- checkout: self
persistCredentials: true
- bash: |
export TEST_MODE=false
git config --global user.email $GIT_USEREMAIL &&
git config --global user.name $GIT_USERNAME &&
unset SYSTEM # remove SYSTEM variable set by azure pipeline
./glew-cmake/maintain.sh

View File

@ -1,136 +0,0 @@
#include <windows.h>
#ifdef GLEW_STATIC
# ifdef _DEBUG
# define FILENAME "glew32sd.dll"
# else
# define FILENAME "glew32s.dll"
# endif
#else
# ifdef _DEBUG
# define FILENAME "glew32d.dll"
# else
# define FILENAME "glew32.dll"
# endif
#endif
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 2, 3, 0, 0
PRODUCTVERSION 2, 3, 0, 0
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
#ifdef _DEBUG
FILEFLAGS VS_FF_DEBUG
#else
FILEFLAGS 0x0L
#endif
FILEOS VOS__WINDOWS32
#ifdef GLEW_STATIC
FILETYPE VFT_STATIC_LIB
#else
FILETYPE VFT_DLL
#endif
FILESUBTYPE VFT2_UNKNOWN
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "Comments",
"The OpenGL Extension Wrangler Library\r\n"
"Copyright (C) 2008-2025, Nigel Stewart <nigels[]nigels com>\r\n"
"Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>\r\n"
"Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>\r\n"
"Copyright (C) 2002, Lev Povalahev\r\n"
"All rights reserved.\r\n"
"\r\n"
"Redistribution and use in source and binary forms, with or without \r\n"
"modification, are permitted provided that the following conditions are met:\r\n"
"\r\n"
"* Redistributions of source code must retain the above copyright notice, \r\n"
" this list of conditions and the following disclaimer.\r\n"
"* Redistributions in binary form must reproduce the above copyright notice, \r\n"
" this list of conditions and the following disclaimer in the documentation \r\n"
" and/or other materials provided with the distribution.\r\n"
"* The name of the author may be used to endorse or promote products \r\n"
" derived from this software without specific prior written permission.\r\n"
"\r\n"
"THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ''AS IS'' \r\n"
"AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE \r\n"
"IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r\n"
"ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE \r\n"
"LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR \r\n"
"CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF \r\n"
"SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\r\n"
"INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\r\n"
"CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n"
"ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF\r\n"
"THE POSSIBILITY OF SUCH DAMAGE.\r\n"
"\r\n"
"\r\n"
"Mesa 3-D graphics library\r\n"
"\r\n"
"Version: 7.0\r\n"
"\r\n"
"Copyright (C) 1999-2007 Brian Paul All Rights Reserved.\r\n"
"\r\n"
"Permission is hereby granted, free of charge, to any person obtaining a\r\n"
"copy of this software and associated documentation files (the ''Software''),\r\n"
"to deal in the Software without restriction, including without limitation\r\n"
"the rights to use, copy, modify, merge, publish, distribute, sublicense,\r\n"
"and/or sell copies of the Software, and to permit persons to whom the\r\n"
"Software is furnished to do so, subject to the following conditions:\r\n"
"\r\n"
"The above copyright notice and this permission notice shall be included\r\n"
"in all copies or substantial portions of the Software.\r\n"
"\r\n"
"THE SOFTWARE IS PROVIDED ''AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS\r\n"
"OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n"
"FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\r\n"
"BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN\r\n"
"AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\r\n"
"CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r\n"
"\r\n"
"\r\n"
"Copyright (c) 2007 The Khronos Group Inc.\r\n"
"\r\n"
"Permission is hereby granted, free of charge, to any person obtaining a\r\n"
"copy of this software and/or associated documentation files (the\r\n"
"''Materials''), to deal in the Materials without restriction, including\r\n"
"without limitation the rights to use, copy, modify, merge, publish,\r\n"
"distribute, sublicense, and/or sell copies of the Materials, and to\r\n"
"permit persons to whom the Materials are furnished to do so, subject to\r\n"
"the following conditions:\r\n"
"\r\n"
"The above copyright notice and this permission notice shall be included\r\n"
"in all copies or substantial portions of the Materials.\r\n"
"\r\n"
"THE MATERIALS ARE PROVIDED ''AS IS'', WITHOUT WARRANTY OF ANY KIND,\r\n"
"EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r\n"
"MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\r\n"
"IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\r\n"
"CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\r\n"
"TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\r\n"
"MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.\0"
VALUE "CompanyName", "\0"
VALUE "FileDescription", "The OpenGL Extension Wrangler Library\0"
VALUE "FileVersion", "2,3,0,0\0"
VALUE "InternalName", "GLEW\0"
VALUE "LegalCopyright", "(C) 2002-2019 Nigel Stewart & Milan Ikits & Marcelo Magallon\0"
VALUE "LegalTrademarks", "\0"
VALUE "OriginalFilename", FILENAME "\0"
VALUE "PrivateBuild", "\0"
VALUE "ProductName", "The OpenGL Extension Wrangler Library\0"
VALUE "ProductVersion", "2,3,0,0\0"
VALUE "SpecialBuild", "\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END

View File

@ -1,124 +0,0 @@
#include <windows.h>
#ifdef _DEBUG
# define FILENAME "glewinfod.exe"
#else
# define FILENAME "glewinfo.exe"
#endif
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 2, 3, 0, 0
PRODUCTVERSION 2, 3, 0, 0
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
#ifdef _DEBUG
FILEFLAGS VS_FF_DEBUG
#else
FILEFLAGS 0x0L
#endif
FILEOS VOS__WINDOWS32
FILETYPE VFT_APP
FILESUBTYPE VFT2_UNKNOWN
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "Comments",
"The OpenGL Extension Wrangler Library\r\n"
"Copyright (C) 2008-2025, Nigel Stewart <nigels[]nigels com>\r\n"
"Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>\r\n"
"Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>\r\n"
"Copyright (C) 2002, Lev Povalahev\r\n"
"All rights reserved.\r\n"
"\r\n"
"Redistribution and use in source and binary forms, with or without \r\n"
"modification, are permitted provided that the following conditions are met:\r\n"
"\r\n"
"* Redistributions of source code must retain the above copyright notice, \r\n"
" this list of conditions and the following disclaimer.\r\n"
"* Redistributions in binary form must reproduce the above copyright notice, \r\n"
" this list of conditions and the following disclaimer in the documentation \r\n"
" and/or other materials provided with the distribution.\r\n"
"* The name of the author may be used to endorse or promote products \r\n"
" derived from this software without specific prior written permission.\r\n"
"\r\n"
"THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ''AS IS'' \r\n"
"AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE \r\n"
"IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r\n"
"ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE \r\n"
"LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR \r\n"
"CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF \r\n"
"SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\r\n"
"INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\r\n"
"CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n"
"ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF\r\n"
"THE POSSIBILITY OF SUCH DAMAGE.\r\n"
"\r\n"
"\r\n"
"Mesa 3-D graphics library\r\n"
"\r\n"
"Version: 7.0\r\n"
"\r\n"
"Copyright (C) 1999-2007 Brian Paul All Rights Reserved.\r\n"
"\r\n"
"Permission is hereby granted, free of charge, to any person obtaining a\r\n"
"copy of this software and associated documentation files (the ''Software''),\r\n"
"to deal in the Software without restriction, including without limitation\r\n"
"the rights to use, copy, modify, merge, publish, distribute, sublicense,\r\n"
"and/or sell copies of the Software, and to permit persons to whom the\r\n"
"Software is furnished to do so, subject to the following conditions:\r\n"
"\r\n"
"The above copyright notice and this permission notice shall be included\r\n"
"in all copies or substantial portions of the Software.\r\n"
"\r\n"
"THE SOFTWARE IS PROVIDED ''AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS\r\n"
"OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n"
"FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\r\n"
"BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN\r\n"
"AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\r\n"
"CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r\n"
"\r\n"
"\r\n"
"Copyright (c) 2007 The Khronos Group Inc.\r\n"
"\r\n"
"Permission is hereby granted, free of charge, to any person obtaining a\r\n"
"copy of this software and/or associated documentation files (the\r\n"
"''Materials''), to deal in the Materials without restriction, including\r\n"
"without limitation the rights to use, copy, modify, merge, publish,\r\n"
"distribute, sublicense, and/or sell copies of the Materials, and to\r\n"
"permit persons to whom the Materials are furnished to do so, subject to\r\n"
"the following conditions:\r\n"
"\r\n"
"The above copyright notice and this permission notice shall be included\r\n"
"in all copies or substantial portions of the Materials.\r\n"
"\r\n"
"THE MATERIALS ARE PROVIDED ''AS IS'', WITHOUT WARRANTY OF ANY KIND,\r\n"
"EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r\n"
"MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\r\n"
"IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\r\n"
"CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\r\n"
"TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\r\n"
"MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.\0"
VALUE "CompanyName", "\0"
VALUE "FileDescription", "Utility for verifying extension entry points\0"
VALUE "FileVersion", "2,3,0,0\0"
VALUE "InternalName", "glewinfo\0"
VALUE "LegalCopyright", "(C) 2002-2019 Nigel Stewart & Milan Ikits & Marcelo Magallon\0"
VALUE "LegalTrademarks", "\0"
VALUE "OriginalFilename", FILENAME "\0"
VALUE "PrivateBuild", "\0"
VALUE "ProductName", "The OpenGL Extension Wrangler Library\0"
VALUE "ProductVersion", "2,3,0,0\0"
VALUE "SpecialBuild", "\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END

View File

@ -1,124 +0,0 @@
#include <windows.h>
#ifdef _DEBUG
# define FILENAME "visualinfod.exe"
#else
# define FILENAME "visualinfo.exe"
#endif
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 2, 3, 0, 0
PRODUCTVERSION 2, 3, 0, 0
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
#ifdef _DEBUG
FILEFLAGS VS_FF_DEBUG
#else
FILEFLAGS 0x0L
#endif
FILEOS VOS__WINDOWS32
FILETYPE VFT_APP
FILESUBTYPE VFT2_UNKNOWN
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "Comments",
"The OpenGL Extension Wrangler Library\r\n"
"Copyright (C) 2008-2025, Nigel Stewart <nigels[]nigels com>\r\n"
"Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>\r\n"
"Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>\r\n"
"Copyright (C) 2002, Lev Povalahev\r\n"
"All rights reserved.\r\n"
"\r\n"
"Redistribution and use in source and binary forms, with or without \r\n"
"modification, are permitted provided that the following conditions are met:\r\n"
"\r\n"
"* Redistributions of source code must retain the above copyright notice, \r\n"
" this list of conditions and the following disclaimer.\r\n"
"* Redistributions in binary form must reproduce the above copyright notice, \r\n"
" this list of conditions and the following disclaimer in the documentation \r\n"
" and/or other materials provided with the distribution.\r\n"
"* The name of the author may be used to endorse or promote products \r\n"
" derived from this software without specific prior written permission.\r\n"
"\r\n"
"THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ''AS IS'' \r\n"
"AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE \r\n"
"IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r\n"
"ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE \r\n"
"LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR \r\n"
"CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF \r\n"
"SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\r\n"
"INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\r\n"
"CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n"
"ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF\r\n"
"THE POSSIBILITY OF SUCH DAMAGE.\r\n"
"\r\n"
"\r\n"
"Mesa 3-D graphics library\r\n"
"\r\n"
"Version: 7.0\r\n"
"\r\n"
"Copyright (C) 1999-2007 Brian Paul All Rights Reserved.\r\n"
"\r\n"
"Permission is hereby granted, free of charge, to any person obtaining a\r\n"
"copy of this software and associated documentation files (the ''Software''),\r\n"
"to deal in the Software without restriction, including without limitation\r\n"
"the rights to use, copy, modify, merge, publish, distribute, sublicense,\r\n"
"and/or sell copies of the Software, and to permit persons to whom the\r\n"
"Software is furnished to do so, subject to the following conditions:\r\n"
"\r\n"
"The above copyright notice and this permission notice shall be included\r\n"
"in all copies or substantial portions of the Software.\r\n"
"\r\n"
"THE SOFTWARE IS PROVIDED ''AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS\r\n"
"OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n"
"FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\r\n"
"BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN\r\n"
"AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\r\n"
"CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r\n"
"\r\n"
"\r\n"
"Copyright (c) 2007 The Khronos Group Inc.\r\n"
"\r\n"
"Permission is hereby granted, free of charge, to any person obtaining a\r\n"
"copy of this software and/or associated documentation files (the\r\n"
"''Materials''), to deal in the Materials without restriction, including\r\n"
"without limitation the rights to use, copy, modify, merge, publish,\r\n"
"distribute, sublicense, and/or sell copies of the Materials, and to\r\n"
"permit persons to whom the Materials are furnished to do so, subject to\r\n"
"the following conditions:\r\n"
"\r\n"
"The above copyright notice and this permission notice shall be included\r\n"
"in all copies or substantial portions of the Materials.\r\n"
"\r\n"
"THE MATERIALS ARE PROVIDED ''AS IS'', WITHOUT WARRANTY OF ANY KIND,\r\n"
"EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r\n"
"MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\r\n"
"IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\r\n"
"CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\r\n"
"TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\r\n"
"MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.\0"
VALUE "CompanyName", "\0"
VALUE "FileDescription", "Utility for listing pixelformat capabilities\0"
VALUE "FileVersion", "2,3,0,0\0"
VALUE "InternalName", "visualinfo\0"
VALUE "LegalCopyright", "(C) 2002-2019 Nigel Stewart & Milan Ikits & Marcelo Magallon\0"
VALUE "LegalTrademarks", "\0"
VALUE "OriginalFilename", FILENAME "\0"
VALUE "PrivateBuild", "\0"
VALUE "ProductName", "The OpenGL Extension Wrangler Library\0"
VALUE "ProductVersion", "2,3,0,0\0"
VALUE "SpecialBuild", "\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END

View File

@ -161,7 +161,7 @@ The latest release contains support for OpenGL 4.6, compatibility and forward-co
<h2>News</h2>
<ul>
<li>[12-27-2025] <a href="https://github.com/nigels-com/glew/releases/tag/glew-2.3.0">GLEW 2.3.0</a> new extensions and minor bug fixes</li>
<li>[06-27-2025] <a href="https://github.com/nigels-com/glew/releases/tag/glew-2.3.0">GLEW 2.3.0</a> new extensions and minor bug fixes</li>
<li>[03-15-2020] <a href="https://github.com/nigels-com/glew/releases/tag/glew-2.2.0">GLEW 2.2.0</a> new extensions and minor bug fixes</li>
<li>[07-31-2017] <a href="https://github.com/nigels-com/glew/releases/tag/glew-2.1.0">GLEW 2.1.0</a> adds support for OpenGL 4.6, new extensions and minor bug fixes</li>
<li>[07-24-2016] <a href="https://github.com/nigels-com/glew/releases/tag/glew-2.0.0">GLEW 2.0.0</a> adds support for forward-compatible contexts, adds new extensions, OSMesa and EGL support, MX discontinued and minor bug fixes</li>

View File

@ -99,6 +99,13 @@ THE POSSIBILITY OF SUCH DAMAGE.
<ul class="none">
<li><b>2.3.0</b> [12-27-2025]
<ul>
<li> Bug fixes:
<ul>
<li> ...
</ul>
</ul>
<ul>
<li> New extensions:
<ul>

View File

@ -1,10 +0,0 @@
# Azure pipeline require glibc based image
FROM debian:buster-slim
RUN apt update && \
apt install -y git make gcc python && \
apt clean && \
rm -rf /var/lib/apt/lists/*
RUN mkdir -p ~/.ssh && \
ssh-keyscan github.com >> ~/.ssh/known_hosts

View File

@ -1,11 +0,0 @@
cmake_minimum_required(VERSION 2.8.12)
project(cmake_install_test)
# Dependencies of glew.
# These are referenced in glewConfig.cmake. but, not automatically found.
find_package(OpenGL REQUIRED)
find_package(X11 REQUIRED)
find_package(glew)
add_executable(glewinfo glewinfo.c)
target_link_libraries(glewinfo PRIVATE libglew_static)

View File

@ -1,18 +0,0 @@
cmake_minimum_required(VERSION 3.4)
project(fetch_content)
include(FetchContent)
FetchContent_Declare(
glew
GIT_REPOSITORY https://github.com/Perlmint/glew-cmake.git
GIT_TAG origin/master
)
FetchContent_GetProperties(glew)
if(NOT glew_POPULATED)
FetchContent_Populate(glew)
add_subdirectory(${glew_SOURCE_DIR} ${glew_BINARY_DIR} EXCLUDE_FROM_ALL)
endif()
add_executable(glewinfo glewinfo.c)
target_link_libraries(glewinfo PRIVATE libglew_static)

View File

@ -1,240 +0,0 @@
#!/bin/bash
#
# This script is used for auto maintaining
# - merging with original repo
# - regenerating sources and headers
# - push changes to repository
#
set -euxo pipefail
ORIGINAL_REPO_URL=https://github.com/nigels-com/glew.git
absolute_path () {
local TARGET_FILE=$1
shift
local OUT=$1
shift
pushd `dirname $TARGET_FILE`
TARGET_FILE=`basename $TARGET_FILE`
# Iterate down a (possible) chain of symlinks
while [ -L "$TARGET_FILE" ]
do
TARGET_FILE=`readlink $TARGET_FILE`
cd `dirname $TARGET_FILE`
TARGET_FILE=`basename $TARGET_FILE`
done
# Compute the canonicalized name by finding the physical path
# for the directory we're in and appending the target file.
PHYS_DIR=`pwd -P`
RESULT=$PHYS_DIR/$TARGET_FILE
eval "$OUT=\"${RESULT}\""
popd
}
if [ -z "${WORKSPACE:-}" ]; then
echo "Set WORKSPACE as default value"
absolute_path "$0" SCRIPT_PATH
WORKSPACE=$(dirname "$SCRIPT_PATH")
WORKSPACE=$(dirname "$WORKSPACE")
echo "WORKSPACE=$WORKSPACE"
fi
if [ -z "${TEST_MODE:-}" -o "${TEST_MODE:-}" != "false" ]; then
PUSH_ARG="--dry-run"
else
PUSH_ARG=""
fi
source_update () {
GIT_BRANCH_NAME=$1
# for recovery when test mode.
PUSH_COUNT=0
echo "Checkout branch ${GIT_BRANCH_NAME}"
git reset --hard
git clean -f .
if [ `git branch | grep ${GIT_BRANCH_NAME} | wc -l` = 0 ]; then
git checkout origin/${GIT_BRANCH_NAME} -b ${GIT_BRANCH_NAME}
else
git checkout -f $GIT_BRANCH_NAME
git pull -s recursive -X theirs --no-edit --progress origin
fi
echo "Pull from origin repository(${ORIGINAL_REPO_URL})"
BEFORE_COMMIT=`git rev-parse HEAD`
git pull -s recursive -X theirs --no-edit --commit --progress original_repo ${GIT_BRANCH_NAME}
AFTER_COMMIT=`git rev-parse HEAD`
if [ "$BEFORE_COMMIT" != "$AFTER_COMMIT" ]; then
echo "Source Updated"
git checkout "original_repo/${GIT_BRANCH_NAME}" -- README.md
git mv -f README.md README_glew.md
git checkout $BEFORE_COMMIT -- README.md
git add -f README.md README_glew.md
git commit --amend -m "Merge ${ORIGINAL_REPO_URL} into ${GIT_BRANCH_NAME} HEAD at $(TZ=GMT date)"
git push ${PUSH_ARG} origin $GIT_BRANCH_NAME:$GIT_BRANCH_NAME
PUSH_COUNT=$((PUSH_COUNT + 1))
fi
cd "$WORKSPACE/auto"
echo "CleanUp"
make clean
cd "$WORKSPACE/auto"
REGISTRIES=`find . -name .git -type d -exec dirname {} \;`
for REGISTRY in $REGISTRIES
do
rm -rf $REGISTRY
done
cd "$WORKSPACE"
echo "Generated Source Update"
make extensions
echo "Diff sources"
git add --force src/glew.c src/glewinfo.c include/GL/* doc/* build/*.rc
# Check is there any staged changes?
if [ `git diff --cached | wc -c` -ne 0 ]; then
# Commit and push it
echo "Sources updated"
git commit -m"Generate Sources of ${GIT_BRANCH_NAME} updated at $(TZ=GMT date)"
echo "Push to repository"
git push ${PUSH_ARG} origin ${GIT_BRANCH_NAME}:${GIT_BRANCH_NAME}
PUSH_COUNT=$((PUSH_COUNT + 1))
else
echo "Differences Not found"
fi
# when test mode, reset created commits
if [ -n "$PUSH_ARG" ]; then
echo "Reset commits"
git reset --hard HEAD~${PUSH_COUNT}
fi
}
import_tags () {
echo "Fetch tags from origin repository(${ORIGINAL_REPO_URL})"
BEFORE_TAG_COUNT=`git tag | wc -l | sed "s/^ \+//"`
git fetch --tags --progress original_repo
AFTER_TAG_COUNT=`git tag | wc -l | sed "s/^ \+//"`
NEW_VERSION_TAGS=`diff -u <(git tag | grep glew-cmake- | sed s/glew-cmake/glew/) <(git tag | grep "glew-[0-9]") | grep ^+ | sed 1d | sed s/^+// || true`
if [ ! $BEFORE_TAG_COUNT -eq $AFTER_TAG_COUNT -o ! -z "$NEW_VERSION_TAGS" ]; then
echo "Tags updated"
git push ${PUSH_ARG} --tags origin
git checkout glew-cmake-release
for TAG in $NEW_VERSION_TAGS
do
echo "Import $TAG"
git checkout $TAG -- .
git mv -f README.md README_glew.md
git checkout master -- CMakeLists.txt GeneratePkgConfig.cmake README.md
cd "$WORKSPACE/auto"
COMMIT_TIME=`git log -1 $TAG --format=%ct`
echo "Patch perl scripts for new version"
find bin -name '*.pl' -exec sed -i "s/do 'bin/use lib '.';\ndo 'bin/" {} \;
echo "Remove registries"
REGISTRIES=`find . -name .git -type d -exec dirname {} \;`
for REGISTRY in $REGISTRIES
do
rm -rf $REGISTRY
done
echo "Run code generation to download registries"
make clean
cd "$WORKSPACE"
make extensions
echo "Rewind registry repos"
cd "$WORKSPACE/auto"
make clean
REGISTRIES=`find . -name .git -type d -exec dirname {} \;`
for REGISTRY in $REGISTRIES
do
cd "$WORKSPACE/auto/$REGISTRY"
PROPER_COMMIT=`git log --until=$COMMIT_TIME -1 --format=%H`
git checkout --force $PROPER_COMMIT
find . -name .dummy -exec touch {} \;
done
echo "CleanUp for tag"
cd "$WORKSPACE/auto"
# remove previous data
rm -rf extensions
echo "Generate source code"
make
cd "$WORKSPACE"
git reset
git add --force src include doc CMakeLists.txt GeneratePkgConfig.cmake build/*.rc config/version
if [ `git diff --cached | wc -c` -ne 0 ]; then
git commit -m"glew-cmake release from $TAG"
NEW_TAG=`echo $TAG | sed s/glew-/glew-cmake-/`
git tag $NEW_TAG
else
echo "No difference! something wrong"
fi
done
git push ${PUSH_ARG} origin glew-cmake-release
if [ -z "$PUSH_ARG" ]; then
git push --tags ${PUSH_ARG} origin
fi
# when test mode, reset created commits
if [ -n "$PUSH_ARG" ]; then
echo "Reset commits for tags"
for TAG in $NEW_VERSION_TAGS
do
NEW_TAG=`echo $TAG | sed s/glew-/glew-cmake-/`
git tag -d $NEW_TAG
git reset --hard HEAD~1
done
fi
fi
}
# add remote when original repo is not found in local repo
if [ `git remote | grep original_repo | wc -l` = 0 ]; then
git remote add original_repo ${ORIGINAL_REPO_URL}
fi
git fetch -n original_repo
branch_list () {
eval "$2=\"`git branch -r | grep $1 | sed "s/\s\+$1\///g" | sed ':a;N;$!ba;s/\n/ /g'`\""
}
contains () {
local OUT=$1
shift
local seeking=$1
shift
local in=1
for element in $*; do
if [ $element = $seeking ]; then
in=0
break
fi
done
eval "$OUT=\"${in}\""
}
#branch_list original_repo ORIGINAL_REPO_BRANCH_LIST
#branch_list origin ORIGIN_REPO_BRANCH_LIST
join () {
local OUT=$1
shift
local value="`echo $* | sed "s/ /\n/g" | sort -u | sed ':a;N;$!ba;s/\n/ /g'`"
eval "$OUT=\"${value}\""
}
#join ALL_BRANCH_LIST $ORIGINAL_REPO_BRANCH_LIST $ORIGIN_REPO_BRANCH_LIST
#
#for branch in $ALL_BRANCH_LIST; do
# contains IN_ORIGINAL_REPO $branch $ORIGINAL_REPO_BRANCH_LIST
# if [ $IN_ORIGINAL_REPO = 1 ]; then
# if [ $branch != "glew-cmake-release" ]; then
# git push ${PUSH_ARG} origin :$branch
# fi
# else
# source_update $branch
# fi
#done
source_update master
import_tags

View File

@ -1,16 +0,0 @@
set(CMAKE_SYSTEM_NAME Windows)
set(TOOLCHAIN_PREFIX x86_64-w64-mingw32)
# cross compilers to use for C, C++ and Fortran
set(CMAKE_C_COMPILER ${TOOLCHAIN_PREFIX}-gcc)
set(CMAKE_CXX_COMPILER ${TOOLCHAIN_PREFIX}-g++)
set(CMAKE_RC_COMPILER ${TOOLCHAIN_PREFIX}-windres)
# target environment on the build host system
set(CMAKE_FIND_ROOT_PATH /usr/${TOOLCHAIN_PREFIX})
# modify default behavior of FIND_XXX() commands
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)

View File

@ -1,6 +0,0 @@
cmake_minimum_required(VERSION 2.8.12)
project(sub_test)
add_subdirectory($ENV{GITHUB_WORKSPACE}/ glew_sub)
add_executable(glewinfo glewinfo.c)
target_link_libraries(glewinfo PRIVATE libglew_static)

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

32966
src/glew.c

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff