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

Aaron Watry awatry at gmail.com
Thu May 3 13:25:04 PDT 2012


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)
-- 
1.7.5.4



More information about the Piglit mailing list