[dia: 12/105] #19: Build objects/standard.



commit 26b00bdf5edddec93254a9a199f57c7ad96761cf
Author: Eduard Nicodei <eddnicodei gmail com>
Date:   Mon Dec 17 23:57:15 2018 +0000

    #19: Build objects/standard.
    
      - builddir/app/dia now works!
      - installdir/bin/dia also works
        (not sure if rpath is the correct solution)

 app/meson.build                      |  4 +++-
 lib/meson.build                      |  3 ++-
 meson.build                          |  5 +++--
 objects/meson.build                  |  1 +
 objects/standard/meson.build         | 28 ++++++++++++++++++++++++++++
 objects/standard/pixmaps/meson.build | 27 +++++++++++++++++++++++++++
 6 files changed, 64 insertions(+), 4 deletions(-)
---
diff --git a/app/meson.build b/app/meson.build
index 0f842587..cccc67e6 100644
--- a/app/meson.build
+++ b/app/meson.build
@@ -69,4 +69,6 @@ dia = executable('dia',
     link_with : libdia,
     include_directories : [configuration_inc, libdia_inc],
     gui_app : true,
-    install : true)
+    install : true,
+    install_rpath : join_paths(get_option('prefix'), get_option('libdir'))
+)
diff --git a/lib/meson.build b/lib/meson.build
index b2431d9b..c0b459fe 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -137,4 +137,5 @@ libdia = shared_library('dia',
     include_directories : configuration_inc,
     c_args : ['-Wall'],
     install : true,
-    install_dir : join_paths(get_option('libdir'), 'dia'))
+    install_rpath : get_option('prefix')
+)
diff --git a/meson.build b/meson.build
index b3ad206a..97da7256 100644
--- a/meson.build
+++ b/meson.build
@@ -38,8 +38,8 @@ conf = configuration_data()
 prefix = get_option('prefix')
 conf.set_quoted('VERSION', meson.project_version())
 conf.set_quoted('GETTEXT_PACKAGE', 'dia')
-conf.set_quoted('DATADIR', get_option('datadir'))
-conf.set_quoted('LIBDIR', get_option('libdir'))
+conf.set_quoted('DATADIR', join_paths(get_option('prefix'), get_option('datadir')))
+conf.set_quoted('LIBDIR',  join_paths(get_option('prefix'), get_option('libdir')))
 conf.set_quoted('LOCALEDIR', get_option('localedir'))
 conf.set('ENABLE_NLS', 1)
 
@@ -60,4 +60,5 @@ configuration_inc = include_directories('.')
 add_project_arguments('-DHAVE_CONFIG_H', language : 'c')
 
 subdir('lib')
+subdir('objects')
 subdir('app')
diff --git a/objects/meson.build b/objects/meson.build
new file mode 100644
index 00000000..1cf69918
--- /dev/null
+++ b/objects/meson.build
@@ -0,0 +1 @@
+subdir('standard')
diff --git a/objects/standard/meson.build b/objects/standard/meson.build
new file mode 100644
index 00000000..647897b4
--- /dev/null
+++ b/objects/standard/meson.build
@@ -0,0 +1,28 @@
+subdir('pixmaps')
+
+standard_objects_sources = [
+    'arc.c',
+    'box.c',
+    'ellipse.c',
+    'textobj.c',
+    'line.c',
+    'zigzagline.c',
+    'polyline.c',
+    'bezier.c',
+    'standard.c',
+    'image.c',
+    'outline.c',
+    'polygon.c',
+    'beziergon.c'
+]
+
+standard_objects = library('standard_objects',
+    standard_objects_sources + [tool_icons_h],
+    dependencies : [libgtk_dep, libglib_dep, libxml_dep, libm_dep],
+    link_with : libdia,
+    include_directories : [configuration_inc, libdia_inc],
+    install : true,
+    install_dir : join_paths(get_option('libdir'), 'dia')
+)
+
+
diff --git a/objects/standard/pixmaps/meson.build b/objects/standard/pixmaps/meson.build
new file mode 100644
index 00000000..bdf01f24
--- /dev/null
+++ b/objects/standard/pixmaps/meson.build
@@ -0,0 +1,27 @@
+icons = [ 'arc.png',
+          'beziergon.png',
+          'bezierline.png',
+          'box.png',
+          'ellipse.png',
+          'image.png',
+          'line.png',
+          'outline.png',
+          'polygon.png',
+          'polyline.png',
+          'text.png',
+          'zigzagline.png' ]
+
+#FIXME: this is duplicated from lib/pixmaps.  Any way to remove this duplication?
+icon_pairs = []
+foreach icon_file : icons
+    icon_pairs += [icon_file.split('.')[0].underscorify() + '_icon', files(icon_file)]
+endforeach
+
+tool_icons_h = custom_target(
+    'tool-icons.h',
+    output : 'tool-icons.h',
+    capture : true,
+    command : [ gdk_pixbuf_csource,
+                '--raw',
+                '--build-list',
+                icon_pairs ])


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