gnome: Use the header basename for #include in mkenums_simple

Otherwise, when you use a File target, the value will be the full path
to the header from the build root, which is not what anyone wants.
0.46
Nirbheek Chauhan 7 years ago
parent 4a3195a443
commit c60cdab928
  1. 2
      mesonbuild/modules/gnome.py
  2. 2
      test cases/frameworks/7 gnome/mkenums/meson.build

@ -1128,7 +1128,7 @@ This will become a hard error in the future.''')
fhead += '%s\n' % body_prefix
fhead += '#include "%s"\n' % hdr_filename
for hdr in sources:
fhead += '#include "%s"\n' % hdr
fhead += '#include "%s"\n' % os.path.basename(str(hdr))
fhead += '''
#define C_ENUM(v) ((gint) v)
#define C_FLAGS(v) ((guint) v)

@ -118,7 +118,7 @@ enumexe3 = executable('enumprog3', main, enums_c3, enums_h3,
dependencies : gobj)
test('enum test 3', enumexe3)
enums4 = gnome.mkenums_simple('enums4', sources : 'meson-sample.h',
enums4 = gnome.mkenums_simple('enums4', sources : files('meson-sample.h'),
function_prefix : '_')
enumexe4 = executable('enumprog4', 'main4.c', enums4, dependencies : gobj)

Loading…
Cancel
Save