diff mbox series

[v2] cmake.bbclass: add Darwin support

Message ID 20240116090219.220432-1-ecordonnier@snap.com
State Accepted, archived
Commit 8ded801178376a02125e653833d8ff062f80457f
Headers show
Series [v2] cmake.bbclass: add Darwin support | expand

Commit Message

Etienne Cordonnier Jan. 16, 2024, 9:02 a.m. UTC
From: Etienne Cordonnier <ecordonnier@snap.com>

This was initially added by https://git.yoctoproject.org/meta-darwin/commit/?id=97a84e083d0c2812e44231d48fb478e9a9cfac79
to the meta-darwin repository, however having it directly in openembedded-core will make the maintenance of meta-darwin easier.

Signed-off-by: Dominik Schnitzer <dominik@snap.com>
Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com>
---
 meta/classes-recipe/cmake.bbclass | 2 ++
 1 file changed, 2 insertions(+)

Comments

Etienne Cordonnier Jan. 16, 2024, 9:02 a.m. UTC | #1
I fixed a typo in the commit message: "directory -> directly".

On Tue, Jan 16, 2024 at 10:02 AM <ecordonnier@snap.com> wrote:

> From: Etienne Cordonnier <ecordonnier@snap.com>
>
> This was initially added by
> https://git.yoctoproject.org/meta-darwin/commit/?id=97a84e083d0c2812e44231d48fb478e9a9cfac79
> to the meta-darwin repository, however having it directly in
> openembedded-core will make the maintenance of meta-darwin easier.
>
> Signed-off-by: Dominik Schnitzer <dominik@snap.com>
> Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com>
> ---
>  meta/classes-recipe/cmake.bbclass | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/meta/classes-recipe/cmake.bbclass
> b/meta/classes-recipe/cmake.bbclass
> index d978b88944..1e353f660f 100644
> --- a/meta/classes-recipe/cmake.bbclass
> +++ b/meta/classes-recipe/cmake.bbclass
> @@ -72,6 +72,8 @@ OECMAKE_TARGET_COMPILE ?= "all"
>  OECMAKE_TARGET_INSTALL ?= "install"
>
>  def map_host_os_to_system_name(host_os):
> +    if host_os.startswith('darwin'):
> +        return 'Darwin'
>      if host_os.startswith('mingw'):
>          return 'Windows'
>      if host_os.startswith('linux'):
> --
> 2.36.1.vfs.0.0
>
>
diff mbox series

Patch

diff --git a/meta/classes-recipe/cmake.bbclass b/meta/classes-recipe/cmake.bbclass
index d978b88944..1e353f660f 100644
--- a/meta/classes-recipe/cmake.bbclass
+++ b/meta/classes-recipe/cmake.bbclass
@@ -72,6 +72,8 @@  OECMAKE_TARGET_COMPILE ?= "all"
 OECMAKE_TARGET_INSTALL ?= "install"
 
 def map_host_os_to_system_name(host_os):
+    if host_os.startswith('darwin'):
+        return 'Darwin'
     if host_os.startswith('mingw'):
         return 'Windows'
     if host_os.startswith('linux'):