[Piglit] [PATCH 1/4] cmake: use more standard cmake names

Jose Fonseca jfonseca at vmware.com
Wed Jan 7 12:32:09 PST 2015


On 07/01/15 20:00, Dylan Baker wrote:
> From: Dylan Baker <dylanx.c.baker at intel.com>
>
> This replaces WAFFLE_* with Waffle_*. It also replaces WAFFLE_LDFLAGS
> with WAFFLE_LIBRARIES, which again is more cmake standard. This will be
> used in follow on patches to use the cmake config module for waffle.
>
> Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>
> ---
>   CMakeLists.txt            | 24 ++++++++++++------------
>   tests/util/CMakeLists.txt |  4 ++--
>   2 files changed, 14 insertions(+), 14 deletions(-)
>
> diff --git a/CMakeLists.txt b/CMakeLists.txt
> index 7a41ee6..3012222 100644
> --- a/CMakeLists.txt
> +++ b/CMakeLists.txt
> @@ -43,9 +43,9 @@ endif()
>
>   if(PIGLIT_USE_WAFFLE)
>   	if (NOT WIN32)
> -		pkg_check_modules(WAFFLE REQUIRED waffle-1)
> +		pkg_check_modules(Waffle REQUIRED waffle-1)
>
> -		if(NOT WAFFLE_FOUND)
> +		if(NOT Waffle_FOUND)
>   			message(FATAL_ERROR "Failed to find Waffle. If Waffle"
>   			"is not packaged for your distribution, you can get "
>   			"it at http://www.waffle-gl.org."
> @@ -60,20 +60,20 @@ if(PIGLIT_USE_WAFFLE)
>   		# validates the required version at most once for the lifetime of the
>   		# source tree.  If someone changes the required version by editing the
>   		# CMakeLists, CMake fails to detect the new requirement.
> -		set(WAFFLE_REQUIRED_VERSION "1.5.0")
> -		if(WAFFLE_VERSION VERSION_LESS WAFFLE_REQUIRED_VERSION)
> -			message(FATAL_ERROR "Found waffle-${WAFFLE_VERSION}, but "
> -			"piglit requires waffle-${WAFFLE_REQUIRED_VERSION}")
> +		set(Waffle_REQUIRED_VERSION "1.5.0")
> +		if(Waffle_VERSION VERSION_LESS Waffle_REQUIRED_VERSION)
> +			message(FATAL_ERROR "Found waffle-${Waffle_VERSION}, but "
> +			"piglit requires waffle-${Waffle_REQUIRED_VERSION}")
>   		endif()
>   	else ()
> -		find_path(WAFFLE_INCLUDE_DIRS waffle.h)
> -		find_library(WAFFLE_LDFLAGS waffle-1)
> -		if(WAFFLE_INCLUDE_DIRS AND WAFFLE_LDFLAGS)
> -			set(WAFFLE_FOUND TRUE)
> +		find_path(Waffle_INCLUDE_DIRS waffle.h)
> +        find_library(Waffle_LIBRARIES waffle-1)
> +		if(Waffle_INCLUDE_DIRS AND Waffle_LIBRARIES)
> +			set(Waffle_FOUND TRUE)
>   		else()
>   			message(FATAL_ERROR "Failed to find Waffle. Get and build Waffle from "
> -				"http://www.waffle-gl.org and set WAFFLE_INCLUDE_DIRS and "
> -				"WAFFLE_LDFLAGS variables accordingly."
> +				"http://www.waffle-gl.org and set Waffle_INCLUDE_DIRS and "
> +				"Waffle_LIBRARIES variables accordingly."
>   			)
>   		endif()
>   	endif ()
> diff --git a/tests/util/CMakeLists.txt b/tests/util/CMakeLists.txt
> index 9774db4..d1141bf 100644
> --- a/tests/util/CMakeLists.txt
> +++ b/tests/util/CMakeLists.txt
> @@ -29,7 +29,7 @@ set(UTIL_GL_INCLUDES
>   	${UTIL_INCLUDES}
>   	${GLEXT_INCLUDE_DIR}
>   	${OPENGL_INCLUDE_PATH}
> -	${WAFFLE_INCLUDE_DIRS}
> +	${Waffle_INCLUDE_DIRS}
>   	)
>
>   set(UTIL_GL_SOURCES
> @@ -86,7 +86,7 @@ if(PIGLIT_USE_WAFFLE)
>   	endif()
>
>   	list(APPEND UTIL_GL_LIBS
> -		${WAFFLE_LDFLAGS}
> +        ${Waffle_LIBRARIES}

Whitespace.  Otherwise looks OK.

Jose

>   	)
>   	IF(PIGLIT_BUILD_GLX_TESTS)
>   		list(APPEND UTIL_GL_LIBS
>



More information about the Piglit mailing list