[waffle] [PATCH] cmake: Fix FindWaffle.cmake to check versions correctly

Dylan Baker baker.dylan.c at gmail.com
Mon Dec 15 11:41:56 PST 2014


Ignore this email. Expect a v2 later today.

On Monday, December 15, 2014 10:34:35 AM Dylan Baker wrote:
> Currently there is a mixture of WAFFLE_INCLUDE_DIR and
> WAFFLE_INCLUDE_DIRS, which leads to the find not working correctly. By
> using only WAFFLE_INCLUDE_DIR this problem is fixed.
> 
> Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>
> ---
> 
> This patch should be suitable for inclusion in the stable 1.4 branch as
> well.
> 
>  cmake/Modules/FindWaffle.cmake | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/cmake/Modules/FindWaffle.cmake b/cmake/Modules/FindWaffle.cmake
> index 972bdfe..e51b83d 100644
> --- a/cmake/Modules/FindWaffle.cmake
> +++ b/cmake/Modules/FindWaffle.cmake
> @@ -39,12 +39,14 @@ if(NOT DEFINED WAFFLE_FIND_VERSION_MAJOR)
>      set(WAFFLE_FIND_VERSION_MAJOR 1)
>  endif()
>  
> -find_path(WAFFLE_INCLUDE_DIRS
> +find_path(
> +    WAFFLE_INCLUDE_DIR
>      NAMES waffle.h
>      PATH_SUFFIXES "waffle-${WAFFLE_FIND_VERSION_MAJOR}"
>   )
>  
> -find_library(WAFFLE_LIBRARIES
> +find_library(
> +    WAFFLE_LIBRARIES
>      NAMES "waffle-${WAFFLE_FIND_VERSION_MAJOR}"
>  )
>  
> @@ -60,11 +62,11 @@ endif()
>  # set 'WAFFLE_FOUND' to TRUE if all listed variables are TRUE
>  include(FindPackageHandleStandardArgs)
>  find_package_handle_standard_args(Waffle
> -    REQUIRED_VARS WAFFLE_LIBRARIES WAFFLE_INCLUDE_DIRS
> +    REQUIRED_VARS WAFFLE_LIBRARIES WAFFLE_INCLUDE_DIR
>      VERSION_VAR WAFFLE_VERSION_STRING
>      )
>  
> -mark_as_advanced(WAFFLE_LIBRARIES WAFFLE_INCLUDE_DIRS)
> +mark_as_advanced(WAFFLE_LIBRARIES WAFFLE_INCLUDE_DIR)
>  
>  # Don't expose these variables.
>  #
> -- 
> 2.2.0
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/waffle/attachments/20141215/61458da2/attachment.sig>


More information about the waffle mailing list