Skip to content

Commit 2787ab2

Browse files
Pin the commit for OpenGL-Registry (downloaded when building GLEW) (#958)
### Pin the commit for OpenGL-Registry (downloaded when building GLEW) ### Linked issues n/a ### Summarize your change. To fix this, `glew.cmake` will clone the `OpenGL-Registry` and checkout the latest working commit before executing the `make` command. It will prevent the build system of GLEW to checkout the master of `OpenGL-Registry`, and it will continue as usual. ### Describe the reason for the change. A recent changes in https://github.com/KhronosGroup/OpenGL-Registry (KhronosGroup/OpenGL-Registry@d38ff69) is causing C++ redefinition of typedef which causes a bunch of errors. See an opened issue in GLEW repository: nigels-com/glew#449 ### Describe what you have tested and on which operating system. CI --------- Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
1 parent c516df6 commit 2787ab2

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

cmake/dependencies/glew.cmake

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,19 @@ EXTERNALPROJECT_ADD(
5252
URL_MD5 ${_download_hash}
5353
DOWNLOAD_NAME ${_target}_${_version}.zip
5454
DOWNLOAD_DIR ${RV_DEPS_DOWNLOAD_DIR}
55+
# Patch to fix the build issue with OpenGL-Registry
56+
# Pinning the OpenGL-Registry version to a specific commit
57+
# https://github.com/nigels-com/glew/issues/449
58+
# Also clone the required glfixes repository
59+
PATCH_COMMAND
60+
cd auto &&
61+
git clone https://github.com/KhronosGroup/OpenGL-Registry.git || true &&
62+
cd OpenGL-Registry &&
63+
git checkout a77f5b6ffd0b0b74904f755ae977fa278eac4e95 &&
64+
cd .. &&
65+
git clone --depth=1 --branch glew https://github.com/nigels-com/glfixes glfixes || true &&
66+
touch OpenGL-Registry/.dummy &&
67+
cd ..
5568
CONFIGURE_COMMAND cd auto && ${_make_command} && cd .. && ${_make_command}
5669
BUILD_COMMAND ${_make_command} -j${_cpu_count} GLEW_DEST=${_install_dir}
5770
INSTALL_COMMAND ${_make_command} install LIBDIR=${_lib_dir} GLEW_DEST=${_install_dir}

0 commit comments

Comments
 (0)