guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#36477] [PATCH v3 04/48] gnu: cmake: Fix cross-compilation.


From: Ludovic Courtès
Subject: [bug#36477] [PATCH v3 04/48] gnu: cmake: Fix cross-compilation.
Date: Wed, 04 Sep 2019 15:00:51 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

Mathieu Othacehe <address@hidden> skribis:

> * gnu/packages/cmake.scm (cmake-minimal-cross): New package.
> * guix/build-system/cmake.scm (default-cmake): Add new target argument and use
> it to select cmake-minimal or cmake-minimal-cross.
> (lower): Pass target to default-cmake.
> ---
>  gnu/packages/cmake.scm      | 8 ++++++++
>  guix/build-system/cmake.scm | 9 ++++++---
>  2 files changed, 14 insertions(+), 3 deletions(-)
>
> diff --git a/gnu/packages/cmake.scm b/gnu/packages/cmake.scm
> index 1d8d829ec5..9bf0273f00 100644
> --- a/gnu/packages/cmake.scm
> +++ b/gnu/packages/cmake.scm
> @@ -207,6 +207,14 @@ and workspaces that can be used in the compiler 
> environment of your choice.")
>      (outputs '("out" "doc"))
>      (properties (alist-delete 'hidden? (package-properties cmake-minimal)))))
>  
> +(define-public cmake-minimal-cross
> +  (package
> +    (inherit cmake-minimal)
> +    (name "cmake-minimal-cross")
> +    (native-search-paths '())
> +    (search-paths
> +     (package-native-search-paths cmake-minimal))))

It seems to be enough to just add ‘search-paths’ to ‘cmake’:

diff --git a/gnu/packages/cmake.scm b/gnu/packages/cmake.scm
index 7186cf98df..9f517238a0 100644
--- a/gnu/packages/cmake.scm
+++ b/gnu/packages/cmake.scm
@@ -151,6 +151,7 @@
      (list (search-path-specification
             (variable "CMAKE_PREFIX_PATH")
             (files '("")))))
+    (search-paths native-search-paths)
     (home-page "https://cmake.org/";)
     (synopsis "Cross-platform build system")
     (description
… and it doesn’t trigger a full rebuild.

Please push that to ‘master’ if it works for you!

Ludo’.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]