File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -120,6 +120,19 @@ if(WIN32 AND EXISTS "${glew_SOURCE_DIR}/build/glew.rc")
120120 file (WRITE "${glew_SOURCE_DIR } /build/glew.rc" "// intentionally blank\n " )
121121endif ()
122122
123+ # glew-cmake 2.2.0 declares cmake_minimum_required(VERSION 2.8.12) which
124+ # CMake 4.x no longer accepts. Bump it to 3.5 in-place before the build.
125+ if (WIN32 AND EXISTS "${glew_SOURCE_DIR } /CMakeLists.txt" )
126+ file (READ "${glew_SOURCE_DIR } /CMakeLists.txt" _glew_content )
127+ string (REGEX REPLACE
128+ "cmake_minimum_required[ \t ]*\\ ([ \t ]*VERSION[ \t ]+[0-9]+\\ .[0-9]+(\\ .[0-9]+)?[ \t ]*\\ )"
129+ "cmake_minimum_required(VERSION 3.5)"
130+ _glew_content "${_glew_content} "
131+ )
132+ file (WRITE "${glew_SOURCE_DIR } /CMakeLists.txt" "${_glew_content} " )
133+ unset (_glew_content)
134+ endif ()
135+
123136# ============================================================================
124137# Download deferred dependencies (SOURCE_SUBDIR fakedir = download only)
125138# ============================================================================
You can’t perform that action at this time.
0 commit comments