[waffle] [PATCH 1/2] cmake: Install FindWaffle.cmake under system configured path

Dylan Baker baker.dylan.c at gmail.com
Sat Dec 27 01:28:35 PST 2014


I haven't tested on gentoo yet. I'll do that.

However, I think we should be putting the find and config modules in
${PREFIX}/lib${arch}/share/cmake, since they are not architecture agnostic
(waffle compiled for x86 does not fullfil x64, while python fulfills python
no matter what version). Cmake supports this setup [0], and looking at that
list closely I don't think its recomended to install directly into
usr/share/cmake.

[0]
http://www.cmake.org/cmake/help/v3.0/command/find_package.html#command:find_package

On Fri, Dec 26, 2014 at 12:11 PM, Jordan Justen <jordan.l.justen at intel.com>
wrote:

> By default cmake modules will be under a versioned path such as
> $PREFIX/share/cmake-3.0/Modules. Although, in the case of gentoo (at
> least), the $PREFIX/share/cmake/Modules path is used.
>
> This change should be compatible with both styles since it uses
> ${CMAKE_ROOT}.
>
> Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
> Cc: Dylan Baker <baker.dylan.c at gmail.com>
> ---
> Dylan, does this work on gentoo?
>
> I guess we can do the same thing with WaffleConfig*, right?
>
>  CMakeLists.txt | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/CMakeLists.txt b/CMakeLists.txt
> index bde8096..aa0ee2f 100644
> --- a/CMakeLists.txt
> +++ b/CMakeLists.txt
> @@ -139,9 +139,11 @@ install(
>      COMPONENT pkgconfig
>      )
>
> +get_filename_component(CMAKE_ROOT_LAST_DIR "${CMAKE_ROOT}" NAME)
> +
>  install(
>      FILES cmake/Modules/FindWaffle.cmake
> -    DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/cmake/Modules"
> +    DESTINATION
> "${CMAKE_INSTALL_DATAROOTDIR}/${CMAKE_ROOT_LAST_DIR}/Modules"
>      COMPONENT cmakefind
>      )
>
> --
> 2.1.3
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/waffle/attachments/20141227/49555c50/attachment.html>


More information about the waffle mailing list