Commit a0b21119 authored by Christian Kellner's avatar Christian Kellner

Fix valac preprocessor conditionals

Two preprocessor conditionals for vala source files were defined
in config.h, which is not picked up during vala compilation. Now,
pass the defines as command line options to valac. Fixes #264
parent 37185716
...@@ -144,8 +144,6 @@ conf.set_quoted('_WEB_EXTENSIONS_DIR', web_extensions_dir) ...@@ -144,8 +144,6 @@ conf.set_quoted('_WEB_EXTENSIONS_DIR', web_extensions_dir)
conf.set_quoted('LANGUAGE_SUPPORT_DIRECTORY', locale_dir) conf.set_quoted('LANGUAGE_SUPPORT_DIRECTORY', locale_dir)
conf.set_quoted('ISO_CODE_639_XML', iso_639_xml) conf.set_quoted('ISO_CODE_639_XML', iso_639_xml)
conf.set_quoted('ISO_CODE_3166_XML', iso_3166_xml) conf.set_quoted('ISO_CODE_3166_XML', iso_3166_xml)
conf.set('HAVE_LIBMESSAGINGMENU', libmessagingmenu.found())
conf.set('HAVE_LIBUNITY', libunity.found())
conf.set('HAVE_FTS3_TOKENIZE', true) conf.set('HAVE_FTS3_TOKENIZE', true)
conf.set('VERSION', meson.project_version()) conf.set('VERSION', meson.project_version())
conf.set('GCR_API_SUBJECT_TO_CHANGE', true) conf.set('GCR_API_SUBJECT_TO_CHANGE', true)
......
...@@ -127,6 +127,8 @@ geary_client_dependencies = [ ...@@ -127,6 +127,8 @@ geary_client_dependencies = [
geary_engine_dep, geary_engine_dep,
] ]
geary_client_vala_options = geary_vala_options
if libmessagingmenu.found() if libmessagingmenu.found()
messagingmenu_vapi = meson.get_compiler('vala').find_library( messagingmenu_vapi = meson.get_compiler('vala').find_library(
'MessagingMenu-1.0', 'MessagingMenu-1.0',
...@@ -135,16 +137,18 @@ if libmessagingmenu.found() ...@@ -135,16 +137,18 @@ if libmessagingmenu.found()
) )
geary_client_dependencies += libmessagingmenu geary_client_dependencies += libmessagingmenu
geary_client_dependencies += messagingmenu_vapi geary_client_dependencies += messagingmenu_vapi
geary_client_vala_options += ['-D', 'HAVE_LIBMESSAGINGMENU']
endif endif
if libunity.found() if libunity.found()
geary_client_dependencies += libunity geary_client_dependencies += libunity
geary_client_vala_options += ['-D', 'HAVE_LIBUNITY']
endif endif
geary_client_lib = static_library('geary-client', geary_client_lib = static_library('geary-client',
geary_client_sources, geary_client_sources,
dependencies: geary_client_dependencies, dependencies: geary_client_dependencies,
include_directories: config_h_dir, include_directories: config_h_dir,
vala_args: geary_vala_options, vala_args: geary_client_vala_options,
c_args: geary_c_options, c_args: geary_c_options,
) )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment