[Piglit] [PATCH 4/4] cmake: Better .

Jose Fonseca jfonseca at vmware.com
Mon Dec 15 04:21:19 PST 2014


Oops. Forgot some words on the subject.  It should have been:

   "cmake: Improve experience detecting waffle on Windows"

Jose

On 15/12/14 12:19, Jose Fonseca wrote:
> From: José Fonseca <jfonseca at vmware.com>
>
> - Use find_path/find_library so one can see the variables on cmake-gui
>
> - Provide better error message.
> ---
>   CMakeLists.txt | 11 +++++++++++
>   1 file changed, 11 insertions(+)
>
> diff --git a/CMakeLists.txt b/CMakeLists.txt
> index 2da7aae..6fb6c8a 100644
> --- a/CMakeLists.txt
> +++ b/CMakeLists.txt
> @@ -65,6 +65,17 @@ if(PIGLIT_USE_WAFFLE)
>   			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)
> +		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."
> +			)
> +		endif()
>   	endif ()
>
>   	add_definitions(-DPIGLIT_USE_WAFFLE)
>



More information about the Piglit mailing list