[gnome-build-meta/abderrahim/cross-compile-fix: 62/62] project.conf: set cmake cross-compile options globally



commit 5812c4009881cec95a43af85144ea5be38c9e4f5
Author: Abderrahim Kitouni <akitouni gnome org>
Date:   Tue Jan 29 07:38:39 2019 +0100

    project.conf: set cmake cross-compile options globally

 elements/sdk/WebKitGTK+.bst    | 14 ++++----------
 files/webkitgtk/toolchain.arm  |  2 --
 files/webkitgtk/toolchain.i686 |  2 --
 project.conf                   | 13 ++++++++++++-
 4 files changed, 16 insertions(+), 15 deletions(-)
---
diff --git a/elements/sdk/WebKitGTK+.bst b/elements/sdk/WebKitGTK+.bst
index 6c2b5ce7..f4b9d672 100644
--- a/elements/sdk/WebKitGTK+.bst
+++ b/elements/sdk/WebKitGTK+.bst
@@ -4,10 +4,6 @@ sources:
   url: webkitgtk_org:webkitgtk-2.23.3.tar.xz
 - kind: patch
   path: files/webkitgtk/gtk-doc-introspection-cross-compiling.patch
-- kind: local
-  path: files/webkitgtk/toolchain.i686
-- kind: local
-  path: files/webkitgtk/toolchain.arm
 depends:
 - sdk/at-spi2-core.bst
 - sdk/brotli.bst
@@ -45,17 +41,15 @@ depends:
 - filename: base-platform.bst
   junction: freedesktop-sdk.bst
 variables:
-  webkitgtk_toolchain: ''
+  webkitgtk-extra: ''
   (?):
-    - arch == "i686":
-        webkitgtk_toolchain: -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=toolchain.i686
-    - arch == "arm":
-        webkitgtk_toolchain: -DCMAKE_TOOLCHAIN_FILE=toolchain.arm
+  - arch == "i686":
+      webkitgtk-extra: -DCMAKE_BUILD_TYPE=Release
   cmake-local:
     -DPORT=GTK
     -DENABLE_PLUGIN_PROCESS_GTK2=OFF
     -DENABLE_BUBBLEWRAP_SANDBOX=OFF
-    %{webkitgtk_toolchain}
+    %{webkitgtk-extra}
 (?):
 - arch == "i686":
     environment:
diff --git a/project.conf b/project.conf
index 75f7a58b..ae3a6e00 100644
--- a/project.conf
+++ b/project.conf
@@ -130,8 +130,19 @@ elements:
 
   cmake:
     variables:
-      cmake-global: -DCMAKE_BUILD_TYPE=RelWithDebInfo
+      toolchain: ''
+      cmake-global: -DCMAKE_BUILD_TYPE=RelWithDebInfo %{toolchain}
       generator: Ninja
+    (?):
+    - arch in ("i686", "arm"):
+        variables:
+          toolchain: -DCMAKE_TOOLCHAIN_FILE=toolchain
+        config:
+          configure-commands:
+            (<):
+              - |
+                echo 'set(CMAKE_SYSTEM_NAME Linux)' > toolchain
+                echo 'set(CMAKE_SYSTEM_PROCESSOR %{arch})' >> toolchain
   distutils:
     variables:
       prefix: /usr/local


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