[build] switch to meson as build system
This commit is contained in:
114
src/meson.build
Normal file
114
src/meson.build
Normal file
@@ -0,0 +1,114 @@
|
||||
|
||||
headers = files(
|
||||
'browser.h',
|
||||
'get.h',
|
||||
'publish.h',
|
||||
'server.h',
|
||||
'teleportappwin.h',
|
||||
'teleportpeer.h',
|
||||
'teleportapp.h'
|
||||
)
|
||||
|
||||
install_headers(headers, subdir: meson.project_name())
|
||||
|
||||
|
||||
################
|
||||
# Source files #
|
||||
################
|
||||
|
||||
sources = files(
|
||||
'browser.c',
|
||||
'get.c',
|
||||
'publish.c',
|
||||
'server.c',
|
||||
'teleportapp.c',
|
||||
'teleportappwin.c',
|
||||
'teleportpeer.c',
|
||||
'main.c'
|
||||
)
|
||||
|
||||
sources += gnome.compile_resources(
|
||||
'gtd-resources',
|
||||
join_paths(data_dir, 'teleportapp.gresource.xml'),
|
||||
source_dir: [ data_dir, join_paths(meson.build_root(), 'plugins') ],
|
||||
c_name: 'teleportapp',
|
||||
# dependencies: plugins_confs,
|
||||
export: true
|
||||
)
|
||||
|
||||
#enum = 'gtd-enum-types'
|
||||
|
||||
#sources += gnome.mkenums(
|
||||
# enum,
|
||||
# sources: enum_headers,
|
||||
# c_template: enum + '.c.template',
|
||||
# h_template: enum + '.h.template'
|
||||
#)
|
||||
|
||||
incs = [
|
||||
top_inc,
|
||||
include_directories(
|
||||
# 'engine',
|
||||
# 'provider',
|
||||
# 'notification',
|
||||
# 'interfaces',
|
||||
# 'views'
|
||||
)
|
||||
]
|
||||
|
||||
cflags = [
|
||||
'-DPACKAGE_DATA_DIR="@0@"'.format(teleportapp_pkgdatadir),
|
||||
'-DPACKAGE_LIB_DIR="@0@"'.format(teleportapp_pkglibdir),
|
||||
'-DPACKAGE_LOCALE_DIR="@0@"'.format(teleportapp_localedir),
|
||||
'-DPACKAGE_SRC_DIR="@0@"'.format(meson.current_source_dir()),
|
||||
'-DUI_DATA_DIR="@0@"'.format(join_paths(teleportapp_pkgdatadir, 'style'))
|
||||
]
|
||||
|
||||
ldflags = [ '-Wl,--export-dynamic' ]
|
||||
|
||||
#if host_machine.system().contains('linux')
|
||||
# foreach ldflag: plugins_ldflags
|
||||
# if cc.has_argument(ldflag)
|
||||
# ldflags += ldflag
|
||||
# endif
|
||||
# endforeach
|
||||
#endif
|
||||
|
||||
|
||||
###############
|
||||
# teleportapp #
|
||||
###############
|
||||
|
||||
teleportapp = executable(
|
||||
meson.project_name(),
|
||||
sources,
|
||||
include_directories: incs,
|
||||
dependencies: teleportapp_deps,
|
||||
c_args: cflags,
|
||||
#link_with: plugins_libs,
|
||||
link_args: ldflags,
|
||||
install: true,
|
||||
install_dir: teleportapp_bindir
|
||||
)
|
||||
|
||||
|
||||
###################
|
||||
# Private library #
|
||||
###################
|
||||
|
||||
libgtd = shared_library(
|
||||
'gtd',
|
||||
sources: sources,
|
||||
version: libversion,
|
||||
soversion: soversion,
|
||||
include_directories: incs,
|
||||
dependencies: teleportapp_deps,
|
||||
c_args: cflags
|
||||
)
|
||||
|
||||
libgtd_dep = declare_dependency(
|
||||
link_with: libgtd,
|
||||
include_directories: src_inc,
|
||||
dependencies: teleportapp_deps
|
||||
)
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<schemalist>
|
||||
<schema path="/org/gtk/teleportapp/" id="org.gtk.teleportapp">
|
||||
<key name="font" type="s">
|
||||
<default>'Monospace 12'</default>
|
||||
<summary>Font</summary>
|
||||
<description>The font to be used for content.</description>
|
||||
</key>
|
||||
<key name="transition" type="s">
|
||||
<choices>
|
||||
<choice value='none'/>
|
||||
<choice value='crossfade'/>
|
||||
<choice value='slide-left-right'/>
|
||||
</choices>
|
||||
<default>'none'</default>
|
||||
<summary>Transition</summary>
|
||||
<description>The transition to use when switching tabs.</description>
|
||||
</key>
|
||||
<key name="show-words" type="b">
|
||||
<default>false</default>
|
||||
<summary>Show words</summary>
|
||||
<description>Whether to show a word list in the sidebar</description>
|
||||
</key>
|
||||
</schema>
|
||||
</schemalist>
|
||||
@@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<gresources>
|
||||
<gresource prefix="/org/gtk/teleportapp">
|
||||
<file preprocess="xml-stripblanks">window.ui</file>
|
||||
<file preprocess="xml-stripblanks">settings.ui</file>
|
||||
<file preprocess="xml-stripblanks">remote_list.ui</file>
|
||||
</gresource>
|
||||
</gresources>
|
||||
Reference in New Issue
Block a user