Skip to content

Commit 78e83f3

Browse files
authored
config.h -> config.vala (#2544)
1 parent 44d00db commit 78e83f3

File tree

7 files changed

+18
-24
lines changed

7 files changed

+18
-24
lines changed

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ aclocal.m4
33
autom4te.cache
44
/build-aux/*
55
ChangeLog
6-
config.h
7-
config.h.in
8-
config.h.in~
96
config.log
107
config.status
118
configure

vapi/config.vapi renamed to config.vala.in

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,9 @@
55
* 2011 Rico Tzschichholz
66
*/
77

8-
[CCode (cprefix = "", lower_case_cprefix = "", cheader_filename = "config.h")]
98
namespace Config {
10-
public const string GETTEXT_PACKAGE;
11-
public const string LOCALEDIR;
12-
public const string VERSION;
13-
public const string PLUGINDIR;
9+
public const string GETTEXT_PACKAGE = "@GETTEXT_PACKAGE@";
10+
public const string LOCALEDIR = "@LOCALEDIR@";
11+
public const string VERSION = "@VERSION@";
12+
public const string PLUGINDIR = "@PLUGINDIR@";
1413
}

daemon-gtk3/meson.build

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ hdy_dep = dependency('libhandy-1')
1313
gala_daemon_bin = executable(
1414
'gala-daemon-gtk3',
1515
gala_daemon_sources,
16+
config_header,
1617
dependencies: [gala_dep, gala_base_dep, granite_dep_old, hdy_dep],
1718
include_directories: config_inc_dir,
1819
install: true,

daemon/meson.build

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@ gala_daemon_sources = files(
1010
gala_daemon_bin = executable(
1111
'gala-daemon',
1212
gala_daemon_sources,
13+
config_header,
1314
gala_resources,
14-
dependencies: [config_dep, granite_dep, gtk4_dep],
15+
dependencies: [granite_dep, gtk4_dep],
1516
include_directories: config_inc_dir,
1617
install: true,
1718
)

docs/meson.build

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ basic_command = [
2323
'--pkg', 'sqlite3',
2424
'--pkg', 'libsystemd',
2525
'--pkg', 'granite',
26-
'--pkg', 'config',
2726
vala_flags,
2827
'--vapidir=' + join_paths(meson.build_root(), 'lib'),
2928
'--vapidir=' + join_paths(meson.global_source_root(), 'vapi'),
@@ -58,6 +57,6 @@ all_doc_target = custom_target(
5857
'@INPUT@'
5958
],
6059
build_by_default: true,
61-
input: gala_lib_sources + gala_bin_sources,
60+
input: gala_lib_sources + gala_bin_sources + [config_header],
6261
output: 'full'
6362
)

meson.build

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
project('gala',
2-
'c', 'vala',
2+
'vala',
33
version: '8.2.5',
44
meson_version: '>= 0.59.0',
55
license: 'GPL3',
@@ -18,20 +18,16 @@ data_dir = join_paths(get_option('prefix'), get_option('datadir'))
1818
plugins_dir = join_paths(get_option('prefix'), get_option('libdir'), meson.project_name(), 'plugins')
1919

2020
conf = configuration_data()
21-
conf.set_quoted('GETTEXT_PACKAGE', meson.project_name())
22-
conf.set_quoted('LOCALEDIR', locale_dir)
23-
conf.set_quoted('PLUGINDIR', plugins_dir)
24-
conf.set_quoted('VERSION', meson.project_version())
25-
config_h = configure_file(
26-
output: 'config.h',
21+
conf.set('GETTEXT_PACKAGE', meson.project_name())
22+
conf.set('LOCALEDIR', locale_dir)
23+
conf.set('PLUGINDIR', plugins_dir)
24+
conf.set('VERSION', meson.project_version())
25+
config_header = configure_file (
26+
input: 'config.vala.in',
27+
output: 'config.vala',
2728
configuration: conf
2829
)
2930

30-
config_dep = declare_dependency(
31-
dependencies: vala.find_library('config', dirs: vapi_dir),
32-
sources: config_h
33-
)
34-
3531
config_inc_dir = include_directories('.')
3632

3733
add_project_arguments([
@@ -158,7 +154,7 @@ endif
158154
add_project_arguments(vala_flags, language: 'vala')
159155
add_project_link_arguments(['-Wl,-rpath,@0@'.format(mutter_typelib_dir)], language: 'c')
160156

161-
gala_base_dep = [atk_bridge_dep, glib_dep, gobject_dep, gio_dep, gio_unix_dep, gmodule_dep, gee_dep, gtk_dep, mutter_dep, gnome_desktop_dep, m_dep, posix_dep, sqlite3_dep, xext_dep, config_dep]
157+
gala_base_dep = [atk_bridge_dep, glib_dep, gobject_dep, gio_dep, gio_unix_dep, gmodule_dep, gee_dep, gtk_dep, mutter_dep, gnome_desktop_dep, m_dep, posix_dep, sqlite3_dep, xext_dep]
162158

163159
if get_option('systemd')
164160
gala_base_dep += systemd_dep

src/meson.build

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ gala_bin_sources = files(
7070
gala_bin = executable(
7171
'gala',
7272
gala_bin_sources,
73+
config_header,
7374
dependencies: [gala_dep, gala_base_dep, pantheon_desktop_shell_dep],
7475
include_directories: config_inc_dir,
7576
install_rpath: mutter_typelib_dir,

0 commit comments

Comments
 (0)