[Piglit] [PATCH 2/4] only link X11 libraries when building GLX tests

nobled nobled at dreamwidth.org
Sun Apr 22 01:42:56 PDT 2012


---
 tests/glx/CMakeLists.gl.txt                        |    6 ++++--
 .../spec/glx_arb_create_context/CMakeLists.gl.txt  |    6 ++++--
 .../spec/glx_ext_import_context/CMakeLists.gl.txt  |    6 ++++--
 3 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/tests/glx/CMakeLists.gl.txt b/tests/glx/CMakeLists.gl.txt
index 61dd9c9..af00586 100644
--- a/tests/glx/CMakeLists.gl.txt
+++ b/tests/glx/CMakeLists.gl.txt
@@ -6,17 +6,19 @@ include_directories(
 )

 link_libraries (
-	piglitglxutil
 	${OPENGL_gl_LIBRARY}
 	${OPENGL_glu_LIBRARY}
 	${GLUT_glut_LIBRARY}
-	${X11_X11_LIB}
 )

 IF(BUILD_GLX_TESTS)
 	include_directories(
 		${GLPROTO_INCLUDE_DIRS}
 	)
+	link_libraries (
+		piglitglxutil
+		${X11_X11_LIB}
+	)
 	piglit_add_executable (glx-fbconfig-sanity glx-fbconfig-sanity.c)
 	piglit_add_executable (glx-fbconfig-compliance glx-fbconfig-compliance.c)
 	piglit_add_executable (glx-fbo-binding glx-fbo-binding.c)
diff --git a/tests/spec/glx_arb_create_context/CMakeLists.gl.txt
b/tests/spec/glx_arb_create_context/CMakeLists.gl.txt
index 585dbd6..59eb01b 100644
--- a/tests/spec/glx_arb_create_context/CMakeLists.gl.txt
+++ b/tests/spec/glx_arb_create_context/CMakeLists.gl.txt
@@ -6,17 +6,19 @@ include_directories(
 )

 link_libraries (
-	piglitglxutil
 	${OPENGL_gl_LIBRARY}
 	${OPENGL_glu_LIBRARY}
 	${GLUT_glut_LIBRARY}
-	${X11_X11_LIB}
 )

 IF(BUILD_GLX_TESTS)
 	include_directories(
 		${GLPROTO_INCLUDE_DIRS}
 	)
+	link_libraries (
+		piglitglxutil
+		${X11_X11_LIB}
+	)
 	piglit_add_executable (glx-create-context-default-major-version
default-major-version.c common.c)
 	piglit_add_executable (glx-create-context-default-minor-version
default-minor-version.c common.c)
 	piglit_add_executable (glx-create-context-invalid-attribute
invalid-attribute.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 425b1f7..b96a5fd 100644
--- a/tests/spec/glx_ext_import_context/CMakeLists.gl.txt
+++ b/tests/spec/glx_ext_import_context/CMakeLists.gl.txt
@@ -6,17 +6,19 @@ include_directories(
 )

 link_libraries (
-	piglitglxutil
 	${OPENGL_gl_LIBRARY}
 	${OPENGL_glu_LIBRARY}
 	${GLUT_glut_LIBRARY}
-	${X11_X11_LIB}
 )

 IF(BUILD_GLX_TESTS)
 	include_directories(
 		${GLPROTO_INCLUDE_DIRS}
 	)
+	link_libraries (
+		piglitglxutil
+		${X11_X11_LIB}
+	)
 	piglit_add_executable (glx-free-context free-context.c common.c)
 	piglit_add_executable (glx-get-context-id get-context-id.c common.c)
 	piglit_add_executable (glx-get-current-display-ext
get-current-display.c common.c)
-- 
1.7.4.1


More information about the Piglit mailing list