summaryrefslogtreecommitdiff
path: root/src/meson.build
diff options
context:
space:
mode:
authorHannes Schulze <43932053+hannesschulze@users.noreply.github.com>2024-11-04 12:58:21 +0100
committerGitHub <noreply@github.com>2024-11-04 12:58:21 +0100
commit40efcf60a5f39674b5137f11de7bcfe37fb121b5 (patch)
tree29e89bf90cd56d26f7432a52bf4bc90c51c632ce /src/meson.build
parentf82081215e1f29140ab9c70e897ac62e9b456919 (diff)
parent83d650b82e5209d2ca24cc1e6bf04e0644b3f615 (diff)
Merge pull request #4 from hannesschulze/3-calculator
Add a calculator to the launcher
Diffstat (limited to 'src/meson.build')
-rw-r--r--src/meson.build77
1 files changed, 55 insertions, 22 deletions
diff --git a/src/meson.build b/src/meson.build
index b089bce..b9383fb 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -1,41 +1,74 @@
foobar_sources = files(
- 'main.c',
'application.c',
'utils.c',
'panel.c',
'launcher.c',
+ 'launcher-item.c',
'control-center.c',
'notification-area.c',
)
+foobar_tests = {}
subdir('dbus')
subdir('services')
subdir('widgets')
+c_args = [
+ '-Wall',
+ '-Werror',
+ '-Wswitch-enum',
+ '-Wswitch-default',
+ '-Wunused',
+ '-Wuninitialized',
+]
+
+deps = [
+ glib_dep,
+ gio_dep,
+ gio_unix_dep,
+ gtk_dep,
+ json_dep,
+ gmp_dep,
+ nm_dep,
+ m_dep,
+ layershell_dep,
+ gvc_dep,
+]
+
+libfoobar = static_library(
+ meson.project_name(),
+ foobar_sources,
+ include_directories: include_directories('.'),
+ dependencies: deps,
+ install: false,
+ c_args: c_args
+)
+
+libfoobar_dep = declare_dependency(
+ link_with: libfoobar,
+ include_directories: include_directories('.'),
+ dependencies: deps,
+)
+
executable(
meson.project_name(),
+ 'main.c',
styles_resource,
icons_resource,
- foobar_sources,
- include_directories: include_directories('.'),
- dependencies: [
- glib_dep,
- gio_dep,
- gio_unix_dep,
- gtk_dep,
- json_dep,
- nm_dep,
- m_dep,
- layershell_dep,
- gvc_dep,
- ],
+ dependencies: [ libfoobar_dep ],
install: true,
- c_args: [
- '-Wall',
- '-Werror',
- '-Wswitch-enum',
- '-Wswitch-default',
- '-Wunused',
- '-Wuninitialized',
- ],
+ c_args: c_args
)
+
+if mutest_dep.found()
+ foreach name, sources : foobar_tests
+ test(
+ name,
+ executable(
+ 'foobar-test-' + name,
+ sources,
+ dependencies: [ libfoobar_dep, mutest_dep ],
+ ),
+ )
+ endforeach
+endif