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

Cmake package 'gl' not found #49

Closed
Noah-Huppert opened this issue Jul 9, 2015 · 7 comments
Closed

Cmake package 'gl' not found #49

Noah-Huppert opened this issue Jul 9, 2015 · 7 comments
Milestone

Comments

@Noah-Huppert
Copy link

I have a CMake project that adds GLEW as an external project

externalProject_add(glew
    GIT_REPOSITORY https://github.com/nigels-com/glew.git
    GIT_TAG glew-1.12.0
    SOURCE_DIR build/cmake
    INSTALL_DIR ${glew_INSTALL_DIR})

When I go to build with Make I get this error

[  5%] Performing update step for 'glew'
[ 11%] Performing configure step for 'glew'
-- checking for module 'gl'
--   package 'gl' not found

This is odd because I know I have OpenGL

$ ~ glxinfo | grep gl
server glx vendor string: SGI
server glx version string: 1.4
server glx extensions:
client glx vendor string: Mesa Project and SGI
client glx version string: 1.4
client glx extensions:
    GL_ARB_texture_rectangle, GL_ARB_texture_storage, GL_ARB_texture_swizzle, 
    GL_EXT_texture_lod_bias, GL_EXT_texture_object, GL_EXT_texture_rectangle, 
    GL_NV_texture_env_combine4, GL_NV_texture_rectangle, GL_OES_EGL_image,

$ ~ glxinfo | grep '^direct rendering:'
direct rendering: Yes
@Noah-Huppert
Copy link
Author

OS: Ubuntu 14.04 x64
Cmake: cmake version 3.3.0-rc3

@tamaskenez
Copy link
Contributor

The CMake support in 1.12.0 was a bit immature. It has been rewritten since. Can you try the HEAD instead? It finds OpenGL with the proper CMake module instead of pkgconfig.

@Noah-Huppert
Copy link
Author

If I remove the GIT_TAG option:

externalProject_add(glew
    GIT_REPOSITORY https://github.com/nigels-com/glew.git
    SOURCE_DIR build/cmake
    INSTALL_DIR ${glew_INSTALL_DIR})

and build I then get this error:

$ make
$ make
[  5%] Performing update step for 'glew'
Ignoring path auto/registry/
Current branch master is up to date.
[ 11%] Performing configure step for 'glew'
CMake Error: The source directory "/home/noah/Documents/glib/build/glew-prefix/src/glew" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
make[2]: *** [glew-prefix/src/glew-stamp/glew-configure] Error 1
make[1]: *** [CMakeFiles/glew.dir/all] Error 2
make: *** [all] Error 2

@Noah-Huppert
Copy link
Author

On a hunch I tried running make in the auto directory( #13 ) but that did not fix it

@tamaskenez
Copy link
Contributor

Now the problem is that ExternalProject thinks the source directory is the root of the GLEW repo, instead of the build/cmake subdirectory. Despite you correctly specified the SOURCE_DIR option.

@Noah-Huppert
Copy link
Author

Woops forgot to update that. I removed the source dir option from external project

@Noah-Huppert
Copy link
Author

Just tweeked a couple things in the external project and it worked

externalProject_add(glew
    GIT_REPOSITORY https://github.com/nigels-com/glew.git

    CONFIGURE_COMMAND make extensions

    BUILD_IN_SOURCE true
    BUILD_COMMAND make

    INSTALL_DIR ${glew_INSTALL_DIR}
    INSTALL_COMMAND sudo make install && sudo make clean)

@nigels-com nigels-com modified the milestone: GLEW 2.0.0 Apr 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants