[Piglit] [PATCH] Fix piglit build when BUILD_GLX_TESTS=True

Chad Versace chad.versace at linux.intel.com
Thu May 3 15:44:19 PDT 2012


On 05/03/2012 01:25 PM, Aaron Watry wrote:
> Commit ebf571b7959ab7b15b4588474a8613e110fab5a5 causes the piglitglxutil
> library to be after the glut library on the link command line, which causes
> the glutInit function to not be found.
> ---
>  tests/glx/CMakeLists.gl.txt                        |    7 ++++++-
>  .../spec/glx_arb_create_context/CMakeLists.gl.txt  |    7 ++++++-
>  .../spec/glx_ext_import_context/CMakeLists.gl.txt  |    7 ++++++-
>  3 files changed, 18 insertions(+), 3 deletions(-)
> 
> diff --git a/tests/glx/CMakeLists.gl.txt b/tests/glx/CMakeLists.gl.txt
> index ca86548..fc00635 100644
> --- a/tests/glx/CMakeLists.gl.txt
> +++ b/tests/glx/CMakeLists.gl.txt
> @@ -5,6 +5,12 @@ include_directories(
>  	${GLUT_INCLUDE_DIR}
>  )
>  
> +if(BUILD_GLX_TESTS)
> +    link_libraries (
> +        piglitglxutil
> +    )
> +endif(BUILD_GLX_TESTS)
> +
>  link_libraries (
>  	${OPENGL_gl_LIBRARY}
>  	${OPENGL_glu_LIBRARY}
> @@ -16,7 +22,6 @@ IF(BUILD_GLX_TESTS)
>  		${GLPROTO_INCLUDE_DIRS}
>  	)
>  	link_libraries (
> -		piglitglxutil
>  		${X11_X11_LIB}
>  	)
>  	piglit_add_executable (glx-fbconfig-sanity glx-fbconfig-sanity.c)
> diff --git a/tests/spec/glx_arb_create_context/CMakeLists.gl.txt b/tests/spec/glx_arb_create_context/CMakeLists.gl.txt
> index 59eb01b..93aba50 100644
> --- a/tests/spec/glx_arb_create_context/CMakeLists.gl.txt
> +++ b/tests/spec/glx_arb_create_context/CMakeLists.gl.txt
> @@ -5,6 +5,12 @@ include_directories(
>  	${GLUT_INCLUDE_DIR}
>  )
>  
> +if(BUILD_GLX_TESTS)
> +    link_libraries (
> +        piglitglxutil
> +    )
> +endif(BUILD_GLX_TESTS)
> +
>  link_libraries (
>  	${OPENGL_gl_LIBRARY}
>  	${OPENGL_glu_LIBRARY}
> @@ -16,7 +22,6 @@ IF(BUILD_GLX_TESTS)
>  		${GLPROTO_INCLUDE_DIRS}
>  	)
>  	link_libraries (
> -		piglitglxutil
>  		${X11_X11_LIB}
>  	)
>  	piglit_add_executable (glx-create-context-default-major-version default-major-version.c common.c)
> diff --git a/tests/spec/glx_ext_import_context/CMakeLists.gl.txt b/tests/spec/glx_ext_import_context/CMakeLists.gl.txt
> index b96a5fd..e6941f2 100644
> --- a/tests/spec/glx_ext_import_context/CMakeLists.gl.txt
> +++ b/tests/spec/glx_ext_import_context/CMakeLists.gl.txt
> @@ -5,6 +5,12 @@ include_directories(
>  	${GLUT_INCLUDE_DIR}
>  )
>  
> +if(BUILD_GLX_TESTS)
> +    link_libraries (
> +        piglitglxutil
> +    )
> +endif(BUILD_GLX_TESTS)
> +
>  link_libraries (
>  	${OPENGL_gl_LIBRARY}
>  	${OPENGL_glu_LIBRARY}
> @@ -16,7 +22,6 @@ IF(BUILD_GLX_TESTS)
>  		${GLPROTO_INCLUDE_DIRS}
>  	)
>  	link_libraries (
> -		piglitglxutil
>  		${X11_X11_LIB}
>  	)
>  	piglit_add_executable (glx-free-context free-context.c common.c)

On my system, I can successfully build glx-fbconfig-sanity with
and without this patch likes this
    rm -rf *
    cmake $src
    make glx-fbconfig-sanity
Out of curiosity, what system are you using? I'm using ArchLinux with freeglut-2.8.0. 

Anyway, since it fixes your build, I've committed this. Thanks.

----
Chad Versace
chad.versace at linux.intel.com


More information about the Piglit mailing list