From d7266c6dc23c680344383ed5f15e96eaa169ba95 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 19 Nov 2022 05:51:43 -0500 Subject: 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. --- NEWS | 3 ++- meson.build | 7 ++++++- 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 Wed, 16 Nov 2022 15:50:45 +0000 + -- David Robillard 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, -- cgit v1.2.1