[Piglit] [PATCH] Fix piglit build when BUILD_GLX_TESTS=True
Aaron Watry
awatry at gmail.com
Thu May 3 16:09:00 PDT 2012
On Thu, May 3, 2012 at 5:44 PM, Chad Versace
<chad.versace at linux.intel.com> wrote:
>
> 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.
>
Linux Mint 12, freeglut 2.6.0.
I wasn't specifying a make target, and I basically did:
ccmake $srcdir <-- (configure w/ defaults && generate)
make
>
> Anyway, since it fixes your build, I've committed this. Thanks.
Thanks for the commit.
>
> ----
> Chad Versace
> chad.versace at linux.intel.com
More information about the Piglit
mailing list