Error trying to generate Makefile for glBinding

368 views Asked by At

I'm trying to generate a MinGW Makefile for glBinding. However, when trying configure for my platform (Windows/GCC), CMake outputs the following errors:

Configuring for platform Windows/GCC.
CMake Error at CMakeFiles/git-data/grabRef.cmake:36 (file):
file failed to open for reading (No such file or directory):

C:/Users/Admin/Desktop/glbinding-master/CMakeFiles/git-data/head-ref
Call Stack (most recent call first):
cmake/GetGitRevisionDescription.cmake:83 (include)
cmake/GitRevision.cmake:14 (get_git_head_revision)
CMakeLists.txt:172 (create_revision_file)

Help would be appreciated, thanks!

1

There are 1 answers

0
Willy Scheibel On

The problematic lines are (cmake/GetGitRevisionDescription.cmake:69-83):

set(GIT_DATA "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/git-data")
if(NOT EXISTS "${GIT_DATA}")
file(MAKE_DIRECTORY "${GIT_DATA}")
endif()

if(NOT EXISTS "${GIT_DIR}/HEAD")
return()
endif()
set(HEAD_FILE "${GIT_DATA}/HEAD")
configure_file("${GIT_DIR}/HEAD" "${HEAD_FILE}" COPYONLY)

configure_file("${_gitdescmoddir}/GetGitRevisionDescription.cmake.in"
"${GIT_DATA}/grabRef.cmake"
@ONLY)
include("${GIT_DATA}/grabRef.cmake")

In the first line a directory is defined where to put a temporary script. As the git revision extraction script proceeds, the temporary script should be created (configure_file("${_gitdescmoddir}/ GetGitRevisionDescription.cmake.in" ${GIT_DATA}/grabRef.cmake" @ONLY)) but in the last line, either the directory or the file wasn't created correctly.

Can you provide further information about your cmake version and the existance of the directory and grabRef.cmake file in your build directory after running into this issue?