Fixed the build error for gcc-14.
[platform/upstream/at-spi2-core.git] / registryd / meson.build
index 5de6902..25f592d 100644 (file)
@@ -16,19 +16,24 @@ registryd_deps = [
   dl_dep,
 ]
 
-if x11_dep.found()
-  registryd_sources += [
-    'deviceeventcontroller-x11.c',
-    'display.c',
-    'event-source.c',
-    'ucs2keysym.c',
-  ]
+x11_option = get_option('x11')
+if x11_option != 'no'
+  if x11_dep.found()
+    registryd_sources += [
+      'deviceeventcontroller-x11.c',
+      'display.c',
+      'event-source.c',
+      'ucs2keysym.c',
+    ]
 
-  registryd_deps += x11_deps 
+    registryd_deps += x11_deps 
+  endif
 endif
 
 executable('at-spi2-registryd', registryd_sources,
            dependencies: registryd_deps,
+           c_args: '-fPIE',
+           link_args: '-pie',
            install: true,
            install_dir: atspi_libexecdir)
 
@@ -38,5 +43,4 @@ libexec_conf.set('libexecdir', atspi_libexecdir)
 configure_file(input: 'org.a11y.atspi.Registry.service.in',
                output: 'org.a11y.atspi.Registry.service',
                configuration: libexec_conf,
-               install: true,
                install_dir: join_paths(atspi_datadir, 'dbus-1/accessibility-services'))