mirror of
https://github.com/Perlmint/glew-cmake.git
synced 2025-12-25 16:33:26 +00:00
Compare commits
354 Commits
glew-2.3.0
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9746f072bd | ||
|
|
5bd03e6e2a | ||
|
|
64c6abbf5d | ||
|
|
7e8300fa13 | ||
|
|
78212a3097 | ||
|
|
981f32baee | ||
|
|
d06782b910 | ||
|
|
b51c519309 | ||
|
|
e399b150a1 | ||
|
|
a9714943d5 | ||
|
|
1eb85d9c2a | ||
|
|
918ece3da8 | ||
|
|
ac12d4d22e | ||
|
|
9e8e33ca17 | ||
|
|
5ee099a5b1 | ||
|
|
852253523f | ||
|
|
49490b10c4 | ||
|
|
0d1debf37f | ||
|
|
72ff6b1a5e | ||
|
|
9f4f3e67eb | ||
|
|
8d3ac6aca3 | ||
|
|
a5494db414 | ||
|
|
e13dcc58e6 | ||
|
|
b9f61b43b2 | ||
|
|
786430a248 | ||
|
|
338306293e | ||
|
|
5aa27cf7d4 | ||
|
|
906f8f7a6e | ||
|
|
3cf29c57e9 | ||
|
|
908ac2eb68 | ||
|
|
0e6711a117 | ||
|
|
4abae5fd0c | ||
|
|
7684bff43b | ||
|
|
a13f8088ac | ||
|
|
bae9d1a33d | ||
|
|
bfe27f1ed1 | ||
|
|
9758219375 | ||
|
|
61ff0a2a04 | ||
|
|
4ed6aac84b | ||
|
|
1eb8c92877 | ||
|
|
91cfa6a5c9 | ||
|
|
7f7e844cfc | ||
|
|
8f9a60f6aa | ||
|
|
062db23216 | ||
|
|
675b56a057 | ||
|
|
f266584c9a | ||
|
|
020831e5ad | ||
|
|
d9504ce13b | ||
|
|
94b823ee04 | ||
|
|
ccc2ac3e40 | ||
|
|
19ecc02312 | ||
|
|
1a5db5d19b | ||
|
|
8260c05ee0 | ||
|
|
9dc72dbd02 | ||
|
|
e392a7c26f | ||
|
|
7c2b7514f6 | ||
|
|
fe9f5c25c6 | ||
|
|
ec2cb231a4 | ||
|
|
570e4534e6 | ||
|
|
466859eeea | ||
|
|
ca63fc313e | ||
|
|
098c409d4d | ||
|
|
31c1901c82 | ||
|
|
442d56d47d | ||
|
|
6940c54fc1 | ||
|
|
23b9557df8 | ||
|
|
c44ef5c33d | ||
|
|
e15487351e | ||
|
|
673391490c | ||
|
|
ce3818d22f | ||
|
|
b7931abd0c | ||
|
|
7c5c9d5f6b | ||
|
|
b832da25bc | ||
|
|
538b2e8d3f | ||
|
|
883e35a3d4 | ||
|
|
4d6020be39 | ||
|
|
d452fb8c39 | ||
|
|
01420c19a9 | ||
|
|
a8ef112236 | ||
|
|
8824bc1146 | ||
|
|
c7dc7efe4e | ||
|
|
e2b4a36751 | ||
|
|
547fc11b29 | ||
|
|
f61e323584 | ||
|
|
78f10dd0e0 | ||
|
|
f1c0b06b1b | ||
|
|
af5eac1089 | ||
|
|
e983f5e0ee | ||
|
|
5cc3b4b8a8 | ||
|
|
67ff18e2ee | ||
|
|
0be1dc6b89 | ||
|
|
81b97ab31e | ||
|
|
c4936e08b7 | ||
|
|
7d525405e6 | ||
|
|
10f2e41b97 | ||
|
|
b78f12e465 | ||
|
|
a1e2e3deab | ||
|
|
f4165c28eb | ||
|
|
a3d0ca0c7f | ||
|
|
e009b0fdce | ||
|
|
a79115599b | ||
|
|
b7aa06157b | ||
|
|
397f383c53 | ||
|
|
430a36d2b8 | ||
|
|
9f3df6c128 | ||
|
|
a553506b46 | ||
|
|
04007493ce | ||
|
|
980ccfe56d | ||
|
|
3900ff84b4 | ||
|
|
669ca8dda9 | ||
|
|
e34677f42b | ||
|
|
2785d66dde | ||
|
|
97419eafab | ||
|
|
9f109bec6c | ||
|
|
c87ee50fb5 | ||
|
|
a8b341554f | ||
|
|
a96e6f1c45 | ||
|
|
c4c1fd4fec | ||
|
|
5ab6ba3039 | ||
|
|
68ac8e80a9 | ||
|
|
55a499e65a | ||
|
|
60eafc8a9b | ||
|
|
b8b7ff3511 | ||
|
|
7d44f3c67c | ||
|
|
ec3049cfc1 | ||
|
|
1b83eb287d | ||
|
|
02629da9ca | ||
|
|
d1d8b889b8 | ||
|
|
3871202dfd | ||
|
|
c32bb089c1 | ||
|
|
83907238d9 | ||
|
|
59a52e570f | ||
|
|
f9b0c4225f | ||
|
|
6f770a5b5b | ||
|
|
4f2237a265 | ||
|
|
cc5cfff738 | ||
|
|
5a59fc7d94 | ||
|
|
59c63684ee | ||
|
|
20ea2d0d07 | ||
|
|
ceb7145f3e | ||
|
|
371895de42 | ||
|
|
acd5fc7f64 | ||
|
|
708bbfd807 | ||
|
|
df23003353 | ||
|
|
41c88953cd | ||
|
|
77fa1efe71 | ||
|
|
1f730ccb3d | ||
|
|
2545ef4e02 | ||
|
|
5bc4c9d380 | ||
|
|
ff01f1db86 | ||
|
|
0329c64675 | ||
|
|
e3f3079a53 | ||
|
|
c52a9eb978 | ||
|
|
8c42082242 | ||
|
|
662a645508 | ||
|
|
e4de8a77a1 | ||
|
|
5a7232fc53 | ||
|
|
def19e7de4 | ||
|
|
f92c14bcc1 | ||
|
|
9cc72c5dc2 | ||
|
|
e6d676975f | ||
|
|
89b83938a2 | ||
|
|
f8de1d2860 | ||
|
|
f2e1f3bac5 | ||
|
|
f93eddb4a4 | ||
|
|
edf558f8f6 | ||
|
|
abb57c9b54 | ||
|
|
f1a95440ea | ||
|
|
b2ea0143bd | ||
|
|
4932bbba1d | ||
|
|
d650219631 | ||
|
|
d36641c3e5 | ||
|
|
923d1cadf3 | ||
|
|
317f39e669 | ||
|
|
831a868c60 | ||
|
|
28c160367b | ||
|
|
302eae8ebb | ||
|
|
99a9408cf0 | ||
|
|
82e4802538 | ||
|
|
8e190fe8fc | ||
|
|
a2ab3e7ca7 | ||
|
|
6dbc940772 | ||
|
|
06ec3affe2 | ||
|
|
679246fadb | ||
|
|
5bb183155b | ||
|
|
6755e0fcac | ||
|
|
4fbb8fe14a | ||
|
|
f43a19ea26 | ||
|
|
ea68a21093 | ||
|
|
ae2050b432 | ||
|
|
db1e93ef4c | ||
|
|
319c412f65 | ||
|
|
7be092340b | ||
|
|
43eefb57d0 | ||
|
|
f0d8d60cce | ||
|
|
4af9476eda | ||
|
|
34d1b6bc31 | ||
|
|
74c6c8f89a | ||
|
|
59b243190a | ||
|
|
5120a35abf | ||
|
|
e6e5c08ff8 | ||
|
|
560041a19b | ||
|
|
998f57e090 | ||
|
|
81af57f72e | ||
|
|
2f22768eb3 | ||
|
|
834284b7ee | ||
|
|
e3fe70d1dc | ||
|
|
9aec204e2e | ||
|
|
eda0eed11c | ||
|
|
93ef744f23 | ||
|
|
a56fb7777e | ||
|
|
c24552fa19 | ||
|
|
19cdf6ac57 | ||
|
|
3be4d079d7 | ||
|
|
69271d06c2 | ||
|
|
0ba2fb54c6 | ||
|
|
faf403280c | ||
|
|
6f3f61c68e | ||
|
|
bc1a01e903 | ||
|
|
280d754ac3 | ||
|
|
3bb390a566 | ||
|
|
c9db554e1f | ||
|
|
c63ddd98f4 | ||
|
|
530355e698 | ||
|
|
ebeeabace8 | ||
|
|
91666953f0 | ||
|
|
f2d45b6f53 | ||
|
|
868558e265 | ||
|
|
ae08241886 | ||
|
|
61948d59d7 | ||
|
|
64d8e37d50 | ||
|
|
f8afe700d5 | ||
|
|
74c8a959b2 | ||
|
|
e4ed595e2c | ||
|
|
b04e9803ef | ||
|
|
51e6b73dda | ||
|
|
0af1837330 | ||
|
|
9b1e3b3dca | ||
|
|
573806ef49 | ||
|
|
8732077f11 | ||
|
|
9ec6e6c1cd | ||
|
|
80726c2df7 | ||
|
|
0c3450e8db | ||
|
|
fc0036b9b7 | ||
|
|
9d73125320 | ||
|
|
bd5d498437 | ||
|
|
12670f2b4a | ||
|
|
19bd2de9e3 | ||
|
|
18197fd0ec | ||
|
|
d8f945586c | ||
|
|
c7de9d54bf | ||
|
|
c1e87433e5 | ||
|
|
902171e1f3 | ||
|
|
ce75a3eb2d | ||
|
|
3a53edea04 | ||
|
|
1a6229a0bb | ||
|
|
32051fc50c | ||
|
|
7574ab4d00 | ||
|
|
bdb7d8bdfc | ||
|
|
0af757be46 | ||
|
|
271dbb8687 | ||
|
|
0d77a03a16 | ||
|
|
5b895ae670 | ||
|
|
26f3c9889d | ||
|
|
62f1f24c73 | ||
|
|
97cb936058 | ||
|
|
4832dfd170 | ||
|
|
3a183ac231 | ||
|
|
f5be4658cb | ||
|
|
88132fdb08 | ||
|
|
2afabc5e36 | ||
|
|
cfcfbb5e6b | ||
|
|
dc27f8e2fe | ||
|
|
8019ddef45 | ||
|
|
77a8c11b80 | ||
|
|
69e31e274f | ||
|
|
1c7e8c529b | ||
|
|
0beff1381f | ||
|
|
6ee5896cdc | ||
|
|
51cb63b12a | ||
|
|
45ebeddf0f | ||
|
|
a3825dcb85 | ||
|
|
2c6f79c148 | ||
|
|
6ca897879f | ||
|
|
819f806107 | ||
|
|
15ad18bc1a | ||
|
|
7cea676806 | ||
|
|
2227a08d22 | ||
|
|
8fe0cc10db | ||
|
|
657889e2a0 | ||
|
|
e7010eea07 | ||
|
|
ffcdf98d6c | ||
|
|
7d4191c138 | ||
|
|
c50a0582bd | ||
|
|
8bd32fb681 | ||
|
|
6db724a060 | ||
|
|
4b50556664 | ||
|
|
90277d022a | ||
|
|
b23fc454db | ||
|
|
61e43be6fb | ||
|
|
c1c69104dd | ||
|
|
117a22ea96 | ||
|
|
c26257cdff | ||
|
|
fc9d19ab37 | ||
|
|
2a34faa730 | ||
|
|
998722981f | ||
|
|
57e1b1d0e9 | ||
|
|
d80b4f1a88 | ||
|
|
5b0b52c70d | ||
|
|
f22182f664 | ||
|
|
5f3a0e31dd | ||
|
|
d45e5d3b34 | ||
|
|
574f6f0407 | ||
|
|
66e8e09e20 | ||
|
|
ceb841390b | ||
|
|
43312b09e8 | ||
|
|
e5f61ba213 | ||
|
|
dfe114f0ba | ||
|
|
963b49b005 | ||
|
|
9d11302877 | ||
|
|
ab43be0f06 | ||
|
|
3a73d80be4 | ||
|
|
1672429f22 | ||
|
|
c23a995349 | ||
|
|
62c39ba638 | ||
|
|
b4f7c06310 | ||
|
|
1dbf20b5b4 | ||
|
|
81d119c7fc | ||
|
|
b2d8206b36 | ||
|
|
ede8f3b946 | ||
|
|
a9ceeeedeb | ||
|
|
9ac6bc4ebb | ||
|
|
64d0afa487 | ||
|
|
17fa396828 | ||
|
|
5dcb9332da | ||
|
|
721efda22d | ||
|
|
61c642b71b | ||
|
|
864a7ea189 | ||
|
|
0e35fbec4e | ||
|
|
322624ffdd | ||
|
|
0680e345f4 | ||
|
|
c94b3de7d7 | ||
|
|
d629461fb0 | ||
|
|
f96a4f3ddf | ||
|
|
e224767d3c | ||
|
|
b23ed9846f | ||
|
|
6b12687640 | ||
|
|
49cae90154 | ||
|
|
f4f7759f3a | ||
|
|
dcd588d402 | ||
|
|
e080154dc4 | ||
|
|
0c0532c7c6 | ||
|
|
dac0614780 | ||
|
|
5408d71c61 |
227
.github/workflows/cmake.yml
vendored
Normal file
227
.github/workflows/cmake.yml
vendored
Normal file
@ -0,0 +1,227 @@
|
|||||||
|
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 .
|
||||||
287
CMakeLists.txt
Normal file
287
CMakeLists.txt
Normal file
@ -0,0 +1,287 @@
|
|||||||
|
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()
|
||||||
62
GeneratePkgConfig.cmake
Normal file
62
GeneratePkgConfig.cmake
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
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
262
README.md
@ -1,255 +1,29 @@
|
|||||||
# GLEW - The OpenGL Extension Wrangler Library
|
# GLEW-cmake - nightly pre-generated snapshot with old unofficial cmake support
|
||||||
|
|
||||||
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](https://github.com/nigels-com/glew) is upstream of this project.
|
||||||
|
But *GLEW* repository does not contain generated sources. Only releases include generated sources.
|
||||||
|
|
||||||

|
*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/
|
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*.
|
||||||
|
|
||||||
https://github.com/nigels-com/glew
|
## Usage
|
||||||
|
|
||||||
[](https://sourceforge.net/projects/glew/files/latest/download)
|
This project provide `libglew_static` and `libglew_shared` library targets and `glewinfo` and `visualinfo` executable targets.
|
||||||
[](https://ap-southeast-2.codebuild.aws.amazon.com/project/eyJlbmNyeXB0ZWREYXRhIjoiK3RLWndGOVVkMWthbXRQZCtVTTNOQ0w2dEpxakZ1cVBTNDZ1UldGODdqUERSdkx0U21Nd0RFaGhQL1kycVlmNzh2OXpEYnRKV3hXTVJJdjUvVStCbTl0dkliZm5jRTFsc0VBPSIsIml2UGFyYW1ldGVyU3BlYyI6ImZ0ekRoMkNjaU0rRUt5K2UiLCJtYXRlcmlhbFNldFNlcmlhbCI6MX0%3D)
|
|
||||||
|
|
||||||
## Table of Contents
|
`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).
|
||||||
|
|
||||||
* [Downloads](#downloads)
|
You can disable each library target by setting `glew-cmake_BUILD_SHARED` or `glew-cmake_BUILD_STATIC` falsy value (ex. `NO`, `FALSE`).
|
||||||
* [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
|
If you need only libraries, Please set `ONLY_LIBS` to `ON`. Otherwise, cmake generates executable targets also.
|
||||||
|
|
||||||
Current release is [2.3.0](https://github.com/nigels-com/glew/releases/tag/glew-2.3.0).
|
You can get pkg-config fils by setting `PKG_CONFIG_REPRESENTATIVE_TARGET` to `libglew_static` or `libglew_shared`.
|
||||||
[(Change Log)](http://glew.sourceforge.net/log.html)
|
|
||||||
|
|
||||||
Sources available as
|
Simply specify dependency of your target with `libglew_static` or `libglew_shared` by `target_link_libraries`.
|
||||||
[ZIP](https://github.com/nigels-com/glew/releases/download/glew-2.3.0/glew-2.3.0.zip) or
|
It will set the additional include directory & the libraries to link to your target.
|
||||||
[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).
|
If you are not familiar with cmake, Some `sub-directory-test.cmake`, `fetch-content.cmake` in [`glew-cmake`](./glew-cmake/) could be helpful.
|
||||||
|
|
||||||
### 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ärkkä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).
|
|
||||||
|
|||||||
249
README_glew.md
Normal file
249
README_glew.md
Normal file
@ -0,0 +1,249 @@
|
|||||||
|
# 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/
|
||||||
|
|
||||||
|
https://github.com/nigels-com/glew
|
||||||
|
|
||||||
|
[](https://sourceforge.net/projects/glew/files/latest/download)
|
||||||
|
[](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ärkkä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).
|
||||||
@ -66,7 +66,7 @@ The latest release contains support for OpenGL 4.6, compatibility and forward-co
|
|||||||
|
|
||||||
<h2>News</h2>
|
<h2>News</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<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>[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>[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>[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-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>
|
<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>
|
||||||
|
|||||||
22
azure-pipelines.yml
Normal file
22
azure-pipelines.yml
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
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
|
||||||
136
build/glew.rc
Normal file
136
build/glew.rc
Normal file
@ -0,0 +1,136 @@
|
|||||||
|
|
||||||
|
#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
|
||||||
124
build/glewinfo.rc
Normal file
124
build/glewinfo.rc
Normal file
@ -0,0 +1,124 @@
|
|||||||
|
|
||||||
|
#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
|
||||||
124
build/visualinfo.rc
Normal file
124
build/visualinfo.rc
Normal file
@ -0,0 +1,124 @@
|
|||||||
|
|
||||||
|
#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
|
||||||
@ -161,7 +161,7 @@ The latest release contains support for OpenGL 4.6, compatibility and forward-co
|
|||||||
|
|
||||||
<h2>News</h2>
|
<h2>News</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<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>[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>[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>[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-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>
|
<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>
|
||||||
|
|||||||
@ -99,13 +99,6 @@ THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
<ul class="none">
|
<ul class="none">
|
||||||
<li><b>2.3.0</b> [12-27-2025]
|
<li><b>2.3.0</b> [12-27-2025]
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li> Bug fixes:
|
|
||||||
<ul>
|
|
||||||
<li> ...
|
|
||||||
</ul>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li> New extensions:
|
<li> New extensions:
|
||||||
<ul>
|
<ul>
|
||||||
|
|||||||
10
glew-cmake/Dockerfile
Normal file
10
glew-cmake/Dockerfile
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
# 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
|
||||||
11
glew-cmake/cmake-install-test.cmake
Normal file
11
glew-cmake/cmake-install-test.cmake
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
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)
|
||||||
18
glew-cmake/fetch-content.cmake
Normal file
18
glew-cmake/fetch-content.cmake
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
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)
|
||||||
240
glew-cmake/maintain.sh
Executable file
240
glew-cmake/maintain.sh
Executable file
@ -0,0 +1,240 @@
|
|||||||
|
#!/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
|
||||||
16
glew-cmake/mingw.cmake
Normal file
16
glew-cmake/mingw.cmake
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
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)
|
||||||
|
|
||||||
6
glew-cmake/sub-directory-test.cmake
Normal file
6
glew-cmake/sub-directory-test.cmake
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
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)
|
||||||
3332
include/GL/eglew.h
Normal file
3332
include/GL/eglew.h
Normal file
File diff suppressed because it is too large
Load Diff
27048
include/GL/glew.h
Normal file
27048
include/GL/glew.h
Normal file
File diff suppressed because it is too large
Load Diff
1843
include/GL/glxew.h
Normal file
1843
include/GL/glxew.h
Normal file
File diff suppressed because it is too large
Load Diff
1468
include/GL/wglew.h
Normal file
1468
include/GL/wglew.h
Normal file
File diff suppressed because it is too large
Load Diff
32966
src/glew.c
Normal file
32966
src/glew.c
Normal file
File diff suppressed because it is too large
Load Diff
19705
src/glewinfo.c
Normal file
19705
src/glewinfo.c
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user