[Piglit] [PATCH 4/8] util: Move EGL utilities from libpiglitutil_gl to libpiglitutil

Ian Romanick idr at freedesktop.org
Tue Oct 15 00:25:39 CEST 2013


I think this needs a bit more love in the CMakeLists.  It can't find
EGL/egl.h and friends when they're not installed in the default places.
 I sure wish cmake and pkgconfig were better friends. :(

On 10/11/2013 07:09 PM, Chad Versace wrote:
> Many EGL tests make no GL calls. This is one step towards enabling those
> tests on platforms having OpenGL ES but not OpenGL.
> 
> Signed-off-by: Chad Versace <chad.versace at linux.intel.com>
> ---
>  tests/util/CMakeLists.no_api.txt | 12 ++++++++++++
>  tests/util/CMakeLists.txt        | 11 -----------
>  tests/util/piglit-util-egl.h     |  2 +-
>  3 files changed, 13 insertions(+), 12 deletions(-)
> 
> diff --git a/tests/util/CMakeLists.no_api.txt b/tests/util/CMakeLists.no_api.txt
> index c331368..41d0e6d 100644
> --- a/tests/util/CMakeLists.no_api.txt
> +++ b/tests/util/CMakeLists.no_api.txt
> @@ -2,6 +2,12 @@ include_directories(
>  	${UTIL_INCLUDES}
>  )
>  
> +if(OPENGL_egl_LIBRARY)
> +	list(APPEND UTIL_SOURCES
> +		piglit-util-egl.c
> +		)
> +endif()
> +
>  piglit_add_library (piglitutil
>  	${UTIL_SOURCES}
>  )
> @@ -10,4 +16,10 @@ if(UNIX)
>  	target_link_libraries(piglitutil m)
>  endif(UNIX)
>  
> +if(OPENGL_egl_LIBRARY)
> +	target_link_libraries(piglitutil
> +		${OPENGL_egl_LIBRARY}
> +	)
> +endif()
> +
>  # vim: ft=cmake:
> diff --git a/tests/util/CMakeLists.txt b/tests/util/CMakeLists.txt
> index dcc5634..83391df 100644
> --- a/tests/util/CMakeLists.txt
> +++ b/tests/util/CMakeLists.txt
> @@ -85,15 +85,4 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
>  	)
>  endif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
>  
> -if(OPENGL_egl_LIBRARY)
> -	set(UTIL_GL_SOURCES
> -	    ${UTIL_GL_SOURCES}
> -	    piglit-util-egl.c
> -	    )
> -	set(UTIL_GL_LIBS
> -		${UTIL_GL_LIBS}
> -		${OPENGL_egl_LIBRARY}
> -	)
> -endif(OPENGL_egl_LIBRARY)
> -
>  piglit_include_target_api()
> diff --git a/tests/util/piglit-util-egl.h b/tests/util/piglit-util-egl.h
> index c43cdf9..62ce749 100644
> --- a/tests/util/piglit-util-egl.h
> +++ b/tests/util/piglit-util-egl.h
> @@ -28,7 +28,7 @@
>  #include <EGL/egl.h>
>  #include <EGL/eglext.h>
>  
> -#include "piglit-util-gl-common.h"
> +#include "piglit-util.h"
>  
>  #ifdef __cplusplus
>  extern "C" {
> 



More information about the Piglit mailing list