[dia/neduard/meson_fixes] #31 Build dia.rc only on Windows (duh..).



commit 0b34be2a2382aad1b6b723a1950901eef69937c8
Author: Eduard <eddnicodei gmail com>
Date:   Fri Feb 1 11:59:46 2019 +0000

    #31 Build dia.rc only on Windows (duh..).
    
      Meson 'windows' module is not defined on *nix.

 app/meson.build | 29 ++++++++++++++++-------------
 1 file changed, 16 insertions(+), 13 deletions(-)
---
diff --git a/app/meson.build b/app/meson.build
index d95c7cc8..4b4a3dde 100644
--- a/app/meson.build
+++ b/app/meson.build
@@ -76,23 +76,26 @@ endif
 
 diaapp_inc = include_directories('.')
 
-win = import('windows')
-dia_icon = win.compile_resources(
-    'dia.rc',
-    args: ['-r'],
-    depend_files: [
-        'dia.ico',
-        'dia2.ico',
-        'dia-app.ico',
-        'dia-diagram.ico'
-    ]
-)
+dia_win_rcs = []
+if build_machine.system() == 'windows'
+    win = import('windows')
+    dia_win_rcs += win.compile_resources(
+        'dia.rc',
+        args: ['-r'],
+        depend_files: [
+            'dia.ico',
+            'dia2.ico',
+            'dia-app.ico',
+            'dia-diagram.ico'
+        ]
+    )
+endif
 
 diaapp = executable('dia',
     [
         dia_sources,
         dia_app_icons_h, diamarshal_h, config_h,
-        dia_icon,
+        dia_win_rcs,
     ],
     dependencies: [libgtk_dep, libxml_dep, libm_dep],
     link_with: [libdia],
@@ -106,7 +109,7 @@ diaapp = executable('dia',
 if build_machine.system() == 'windows'
     dia_win_remote = executable(
         'dia-win-remote',
-        ['dia-win-remote.c', dia_icon],
+        ['dia-win-remote.c', dia_win_rcs],
         dependencies: [libgtk_dep],
         link_args: ['-lshlwapi'],
         gui_app: true,


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