meson: Only set libseat defines for libseat itself
This allows us to distinguish between when we build seatd as part of the builtin libseat backend, or when we build seatd on its own.
This commit is contained in:
parent
ae42d05513
commit
abcecbb53b
1 changed files with 8 additions and 4 deletions
12
meson.build
12
meson.build
|
@ -121,8 +121,10 @@ if with_seatd or with_builtin
|
||||||
private_files += 'libseat/backend/seatd.c'
|
private_files += 'libseat/backend/seatd.c'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
libseat_c_args = ['-DLIBSEAT=1']
|
||||||
|
|
||||||
if with_seatd
|
if with_seatd
|
||||||
add_project_arguments('-DSEATD_ENABLED=1', language: 'c')
|
libseat_c_args += '-DSEATD_ENABLED=1'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
logind = disabler()
|
logind = disabler()
|
||||||
|
@ -137,8 +139,8 @@ if get_option('libseat-logind') != 'disabled'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if logind.found()
|
if logind.found()
|
||||||
add_project_arguments('-DLOGIND_ENABLED=1', language: 'c')
|
libseat_c_args += '-DLOGIND_ENABLED=1'
|
||||||
add_project_arguments('-DHAVE_@0@=1'.format(logind.name().to_upper()), language: 'c')
|
libseat_c_args += '-DHAVE_@0@=1'.format(logind.name().to_upper())
|
||||||
private_files += [
|
private_files += [
|
||||||
'libseat/backend/logind.c',
|
'libseat/backend/logind.c',
|
||||||
'common/drm.c',
|
'common/drm.c',
|
||||||
|
@ -152,7 +154,7 @@ realtime = meson.get_compiler('c').find_library('rt')
|
||||||
private_deps += realtime
|
private_deps += realtime
|
||||||
|
|
||||||
if with_builtin
|
if with_builtin
|
||||||
add_project_arguments('-DBUILTIN_ENABLED=1', language: 'c')
|
libseat_c_args += '-DBUILTIN_ENABLED=1'
|
||||||
private_files += server_files
|
private_files += server_files
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -161,6 +163,7 @@ private_lib = static_library(
|
||||||
private_files,
|
private_files,
|
||||||
dependencies: private_deps,
|
dependencies: private_deps,
|
||||||
include_directories: [include_directories('.', 'include')],
|
include_directories: [include_directories('.', 'include')],
|
||||||
|
c_args: libseat_c_args,
|
||||||
)
|
)
|
||||||
|
|
||||||
symbols_file = 'libseat/libseat.syms'
|
symbols_file = 'libseat/libseat.syms'
|
||||||
|
@ -174,6 +177,7 @@ lib = library(
|
||||||
install: true,
|
install: true,
|
||||||
link_args: symbols_flag,
|
link_args: symbols_flag,
|
||||||
link_depends: symbols_file,
|
link_depends: symbols_file,
|
||||||
|
c_args: libseat_c_args,
|
||||||
)
|
)
|
||||||
|
|
||||||
install_headers('include/libseat.h')
|
install_headers('include/libseat.h')
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue