nigels-com / glew

The OpenGL Extension Wrangler Library
Other
2.58k stars 608 forks source link

Is CMakeLists.txt maintained? #383

Closed nackdai closed 1 year ago

nackdai commented 1 year ago

I cloned the latest on main branch and tried to build via CMake. But, I got the following errors:

CMake Error at CMakeLists.txt:135 (add_library):
  Cannot find source file:

    D:/work/aten/3rdparty/glew/include/GL/wglew.h

  Tried extensions .c .C .c++ .cc .cpp .cxx .cu .mpp .m .M .mm .ixx .cppm .h
  .hh .h++ .hm .hpp .hxx .in .txx .f .F .for .f77 .f90 .f95 .f03 .hip .ispc

CMake Error at CMakeLists.txt:135 (add_library):
  No SOURCES given to target: glew

CMake Error at CMakeLists.txt:139 (add_library):
  No SOURCES given to target: glew_s

In build/cmake/CMakeLists.txt, I found the following:

set (GLEW_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../..)
include_directories (${GLEW_DIR}/include ${X11_INCLUDE_DIR})

set (GLEW_PUBLIC_HEADERS_FILES
  ${GLEW_DIR}/include/GL/wglew.h
  ${GLEW_DIR}/include/GL/glew.h
  ${GLEW_DIR}/include/GL/glxew.h
  ${GLEW_DIR}/include/GL/eglew.h
)
set (GLEW_SRC_FILES ${GLEW_DIR}/src/glew.c)

if (WIN32)
  list (APPEND GLEW_SRC_FILES ${GLEW_DIR}/build/glew.rc)
endif ()

add_library (glew SHARED ${GLEW_PUBLIC_HEADERS_FILES} ${GLEW_SRC_FILES})

It seems that ${GLEW_DIR}/include/GL is ../../include/GL. But, I can't find include/GL directory itself. So, I think cmake can't find any specified .h files.

I am wondering whether CMakeLists.txt is maintained.

cmake version is 3.26.3.

nigels-com commented 1 year ago

Appears to be a duplicate of Issue #13

The GLEW repo is essentially the set of scripts to generate GLEW, but not the generated sources themselves.

nackdai commented 1 year ago

I see. Then, where is the official release location?

https://github.com/nigels-com/glew/releases/tag/glew-2.2.0

https://sourceforge.net/projects/glew/files/glew/2.1.0/

It seems github repo advances than 2.1.0. So, if possible, I'd like to use the newer one.

Or, is there nothing different from 2.1.0?

nigels-com commented 1 year ago

GLEW 2.2.0 is the current release. I do need to go and update the sourceforge page to reflect that.

https://github.com/nigels-com/glew/releases

nackdai commented 1 year ago

I see. Thanks