Add ability to build with Meson
So that vala-language-server can be used, see also https://github.com/benwaffle/vala-language-server/issues/73 Works with both vim-lsp and Qt Creator, to some extent.
This commit is contained in:
parent
487ea01334
commit
c9795fe01a
|
@ -7,3 +7,5 @@
|
||||||
/wdmtg.files
|
/wdmtg.files
|
||||||
/wdmtg.creator*
|
/wdmtg.creator*
|
||||||
/wdmtg.includes
|
/wdmtg.includes
|
||||||
|
/wdmtg.cflags
|
||||||
|
/wdmtg.cxxflags
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
[CCode (cprefix = "", lower_case_cprefix = "")]
|
[CCode (cprefix = "", lower_case_cprefix = "")]
|
||||||
namespace Config
|
namespace Config
|
||||||
{
|
{
|
||||||
public const string PROJECT_NAME = "${CMAKE_PROJECT_NAME}";
|
public const string PROJECT_NAME = "@CMAKE_PROJECT_NAME@";
|
||||||
public const string PROJECT_VERSION = "${project_VERSION}";
|
public const string PROJECT_VERSION = "@project_VERSION@";
|
||||||
public const string SHARE_DIR = "@project_SHARE_DIR@";
|
public const string SHARE_DIR = "@project_SHARE_DIR@";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,33 @@
|
||||||
|
project('wdmtg', 'vala', 'c', default_options : ['c_std=gnu99'],
|
||||||
|
version : '0.1.0')
|
||||||
|
add_project_arguments(['--vapidir', meson.current_source_dir()],
|
||||||
|
language: 'vala')
|
||||||
|
|
||||||
|
conf = configuration_data()
|
||||||
|
conf.set('CMAKE_PROJECT_NAME', meson.project_name())
|
||||||
|
conf.set('project_VERSION', meson.project_version())
|
||||||
|
configure_file(
|
||||||
|
input : 'config.vala.in',
|
||||||
|
output : 'config.vala',
|
||||||
|
configuration : conf,
|
||||||
|
)
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
dependency('gtk+-3.0'),
|
||||||
|
dependency('gmodule-2.0'),
|
||||||
|
dependency('gio-2.0'),
|
||||||
|
dependency('gee-0.8'),
|
||||||
|
dependency('sqlite3'),
|
||||||
|
dependency('x11'),
|
||||||
|
|
||||||
|
# Ours
|
||||||
|
dependency('xext'),
|
||||||
|
dependency('xextproto'),
|
||||||
|
]
|
||||||
|
sources = files(
|
||||||
|
'wdmtg.vala',
|
||||||
|
meson.current_build_dir() / 'config.vala',
|
||||||
|
)
|
||||||
|
executable('wdmtg', sources,
|
||||||
|
install : true,
|
||||||
|
dependencies : dependencies)
|
|
@ -0,0 +1 @@
|
||||||
|
// https://github.com/mesonbuild/meson/issues/1195
|
Loading…
Reference in New Issue