Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing source files and incorrect CMakeLists.txt lead to failed project configuration #314

Open
aleksandaratanasov opened this issue Aug 16, 2021 · 1 comment
Labels

Comments

@aleksandaratanasov
Copy link

I have a top-level project that does the following call to glew git submodule:

add_subdirectory(deps/glew/build/cmake)

For now I am excluding the importing of GLEW::glew (include(deps/glew/build/cmake/glew-config.cmake)) due to the fact that the call above yields an error.

-- Configuring done
CMake Error at deps/glew/build/cmake/CMakeLists.txt:205 (add_executable):
Cannot find source file:
...

It goes on and on listing various GLEW source files. I printed out ${GLEW_DIR} inside the CMakeLists.txt right after it is defined and it revealed the following value:

/home/USER/Projects/Eclipse/workspace1/PROJECT/deps/glew/build/cmake/../..

This means that GLEW_DIR is pointing (in my case) at [...]/deps/glew. In itself this is correct since the variable is supposed to point at the root directory of the GLEW project. However anything with ${GLEW_DIR}/src/*.c leads to an obvious error since. I have checked out master branchthere is but one source file insrcdirectory namelyvisualinfo.c. All other source files are in auto/src` directory.

But that is not the only issue. I saw glew.c being added. However I am unable (with the call ls -R | grep glew.c) to find a single source file with that name. Since I don't see this file being generated (smae applies to glewinfo.c) I assume that the file is missing.

@nigels-com
Copy link
Owner

For the purpose of a git submodule, I'd recommend using:
Perlmint/glew-cmake rather than this upstream repository.

The long standing policy here is to maintain the history of the GLEW code generators, but not the corresponding history of the generated code. The general advice is to use the current GLEW release, rather than the in-progress master branch.

I do appreciate that this arrangement is old-fashioned, but indeed GLEW has been around for a good long while.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants