[dia: 37/105] #19: OpenBSD build: specify the -L argument when compiling the app.



commit 044c39afa280d9498bac1498203b132074552c48
Author: eduard <eduard diabuild my.domain>
Date:   Fri Dec 28 10:22:21 2018 +0000

    #19: OpenBSD build: specify the -L argument when compiling the app.
    
      - This solves 'undefined symbols' error due to missing -L/usr/lib/local
        flag.

 app/meson.build | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
---
diff --git a/app/meson.build b/app/meson.build
index 7e819bc7..9185a807 100644
--- a/app/meson.build
+++ b/app/meson.build
@@ -63,10 +63,20 @@ dia_sources = [
     'main.c'
 ]
 
+#FIXME: this is workaround for openbsd where libraries are in /usr/lib/local
+pkg_config = find_program('pkg-config')
+pkg_config_libdir = run_command(pkg_config, '--libs-only-L', 'libxml-2.0').stdout().strip()
+
+dia_link_args = []
+if pkg_config_libdir != ''
+    dia_link_args += pkg_config_libdir
+endif
+
 executable('dia',
     dia_sources + [dia_app_icons_h],
     dependencies : [libgtk_dep, libxml_dep, libm_dep],
-    link_with : libdia,
+    link_with : [libdia],
+    link_args: dia_link_args,
     include_directories : [configuration_inc, libdia_inc],
     gui_app : true,
     install : true,


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