aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2022-11-19 05:51:43 -0500
committerDavid Robillard <d@drobilla.net>2022-11-19 05:51:43 -0500
commitd7266c6dc23c680344383ed5f15e96eaa169ba95 (patch)
tree69daa111daab7388f1223dbb66dc499ba961532b
parent58c940437a3df2f3a542e52aa9db5607f6c1c378 (diff)
downloadjalv-d7266c6dc23c680344383ed5f15e96eaa169ba95.tar.gz
jalv-d7266c6dc23c680344383ed5f15e96eaa169ba95.tar.bz2
jalv-d7266c6dc23c680344383ed5f15e96eaa169ba95.zip
Build Qt UI with -fPIC
Qt is built with -reduce-relocations on Ubuntu, which annoyingly requires executables to be built with -fPIC. I have no idea how to detect this situation, so will just blissfully assume that it doesn't cause any problems elsewhere.
-rw-r--r--NEWS3
-rw-r--r--meson.build7
2 files changed, 8 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index 9bc92b0..11e65a8 100644
--- a/NEWS
+++ b/NEWS
@@ -1,8 +1,9 @@
jalv (1.6.9) stable; urgency=medium
+ * Build Qt UI with -fPIC
* Switch to external zix dependency
- -- David Robillard <d@drobilla.net> Wed, 16 Nov 2022 15:50:45 +0000
+ -- David Robillard <d@drobilla.net> Sat, 19 Nov 2022 10:51:27 +0000
jalv (1.6.8) stable; urgency=medium
diff --git a/meson.build b/meson.build
index 72f14e0..12c291f 100644
--- a/meson.build
+++ b/meson.build
@@ -333,6 +333,11 @@ if not get_option('qt5').disabled()
endif
if moc.found()
+ qt_args = []
+ if cpp.get_id() in ['clang', 'gcc']
+ qt_args = ['-fPIC']
+ endif
+
jalv_qt_hpp = files(jalv_src_root / 'src' / 'jalv_qt.hpp')
jalv_qt5_meta_cpp = custom_target(
@@ -347,7 +352,7 @@ if not get_option('qt5').disabled()
'jalv.qt5',
sources + files('src/jalv_qt.cpp') + [jalv_qt5_meta_cpp],
c_args: c_suppressions + platform_defines + suil_defines,
- cpp_args: cpp_suppressions + platform_defines + suil_defines,
+ cpp_args: cpp_suppressions + platform_defines + suil_defines + qt_args,
dependencies: common_dependencies + [qt5_dep, suil_dep],
include_directories: include_directories('src'),
install: true,