[Mesa-dev] [PATCH demos v2] build: require glew 1.5.4

Jose Fonseca jfonseca at vmware.com
Thu Sep 13 06:02:03 PDT 2012



----- Original Message -----
> also remove the fallback path
> 
> v2: also check for glew in cmake build system
> 
> Should fix:
> https://bugs.freedesktop.org/show_bug.cgi?id=29411
> https://bugs.freedesktop.org/show_bug.cgi?id=33676
> ---
>  CMakeLists.txt |    2 ++
>  configure.ac   |   13 ++-----------
>  2 files changed, 4 insertions(+), 11 deletions(-)
> 
> diff --git a/CMakeLists.txt b/CMakeLists.txt
> index 85390b1..01a7663 100644
> --- a/CMakeLists.txt
> +++ b/CMakeLists.txt
> @@ -17,6 +17,8 @@ find_path (GLEW_INCLUDE_DIR GL/glew.h
>        /usr/include/GL
>  )
>  
> +pkg_check_modules(GLEW REQUIRED glew>=1.5.4)

This will not work on windows, as pkg-config is not available there.

> +
>  if (NOT WIN32)

If the pkg_check_modules()  line goes inside this if block, then it should be OK.

>  	pkg_check_modules (EGL egl)
>  	pkg_check_modules (GLESV1 glesv1_cm)
> diff --git a/configure.ac b/configure.ac
> index 264cb75..8b2c359 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -83,17 +83,8 @@ AC_CHECK_LIB([glut],
>  		[],
>  		[glut_enabled=no])
>  
> -dnl Include a fallback path for GLEW for the moment while not all
> distros
> -dnl have picked up the .pc file.
> -PKG_CHECK_MODULES(GLEW, [glew], [], [
> -		  AC_CHECK_HEADER([GL/glew.h],
> -				  [GLEW_CFLAGS=""],
> -				  AC_MSG_ERROR([GLEW required]))
> -		  AC_CHECK_LIB([GLEW],
> -			       [glewInit],
> -			       [GLEW_LIBS="-lGLEW"],
> -			       AC_MSG_ERROR([GLEW required]))
> -		  ])
> +dnl Check for GLEW
> +PKG_CHECK_MODULES(GLEW, [glew >= 1.5.4])
>  DEMO_CFLAGS="$DEMO_CFLAGS $GLEW_CFLAGS"
>  DEMO_LIBS="$DEMO_LIBS $GLEW_LIBS"
>  
> --
> 1.7.4.1
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
> 


More information about the mesa-dev mailing list