2017-11-25 11:39:06 +01:00
common_inc = include_directories ( '.' )
nm_polkit_listener = files ( 'nm-polkit-listener.c' )
deps = [
2018-01-07 15:39:42 +01:00
libnm_dep ,
nm_core_dep
2017-11-25 11:39:06 +01:00
]
2018-01-02 13:37:06 +01:00
cflags = clients_cflags + [
2017-11-25 11:39:06 +01:00
'-DG_LOG_DOMAIN="libnmc"' ,
]
sources = shared_utils + files (
'nm-client-utils.c' ,
'nm-secret-agent-simple.c' ,
'nm-vpn-helpers.c'
)
libnmc_base = static_library (
'nmc-base' ,
2018-01-07 15:39:42 +01:00
sources : sources ,
2017-11-25 11:39:06 +01:00
dependencies : deps ,
2018-01-07 15:39:42 +01:00
c_args : cflags
2017-11-25 11:39:06 +01:00
)
libnmc_base_dep = declare_dependency (
2018-01-07 15:39:42 +01:00
include_directories : common_inc ,
link_with : libnmc_base
2017-11-25 11:39:06 +01:00
)
sources = shared_meta_setting + files (
'nm-meta-setting-access.c' ,
'nm-meta-setting-desc.c'
)
2018-01-11 17:02:13 +01:00
settings_docs = 'settings-docs.h'
2017-11-25 11:39:06 +01:00
2017-12-18 20:33:13 +01:00
if enable_introspection
2017-11-25 11:39:06 +01:00
settings_docs_source = custom_target (
settings_docs ,
input : nm_property_docs ,
output : settings_docs ,
command : [ xsltproc , '--output' , '@OUTPUT@' , join_paths ( meson . current_source_dir ( ) , 'settings-docs.xsl' ) , '@INPUT@' ]
)
# FIXME: if enabled the check happens even if the settings_docs_source is not set
'' '
if get_option ( 'check_settings_docs' )
res = run_command ( find_program ( 'cmp' ) , '-s' , settings_docs + '.in' , settings_docs_source . full_path ( ) )
if res . returncode ( ) != 0
message ( 'The generated file ' + settings_docs_source . full_path ( ) + ' differs from the source file ' + settings_docs + '.in' + '. You probably should copy the generated file over to the source file. You can skip this test by setting -Dcheck_settings_docs=false' )
endif
endif
'' '
else
settings_docs_source = configure_file (
input : settings_docs + '.in' ,
output : settings_docs ,
configuration : configuration_data ( )
)
endif
sources + = settings_docs_source
libnmc = static_library (
'nmc' ,
2018-01-07 15:39:42 +01:00
sources : sources ,
2017-11-25 11:39:06 +01:00
dependencies : deps ,
2018-01-02 13:37:06 +01:00
c_args : cflags ,
2017-11-25 11:39:06 +01:00
link_with : libnmc_base ,
link_depends : settings_docs_source
)
libnmc_dep = declare_dependency (
2018-01-07 15:39:42 +01:00
include_directories : common_inc ,
link_with : libnmc
2017-11-25 11:39:06 +01:00
)
if ( enable_introspection or enable_nmtui ) and enable_tests
subdir ( 'tests' )
endif