[devhelp] meson: compile app
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [devhelp] meson: compile app
- Date: Mon, 12 Mar 2018 20:16:53 +0000 (UTC)
commit f880d5e1c1dc16f77ed0fed4f50c2f45461cee38
Author: Sébastien Wilmet <swilmet gnome org>
Date: Mon Mar 12 20:29:55 2018 +0100
meson: compile app
devhelp/meson.build | 9 ++++++++-
meson.build | 14 ++++++++++----
src/meson.build | 21 +++++++++++++++++++++
unit-tests/meson.build | 2 +-
4 files changed, 40 insertions(+), 6 deletions(-)
---
diff --git a/devhelp/meson.build b/devhelp/meson.build
index 1a92619..e93586e 100644
--- a/devhelp/meson.build
+++ b/devhelp/meson.build
@@ -65,7 +65,7 @@ libdevhelp_static = static_library(
)
# For unit tests, to be able to test private functions.
-LIBDEVHELP_STATIC_DEP = declare_dependency(
+STATIC_LIBDEVHELP_DECLARED_DEP = declare_dependency(
sources : libdevhelp_enum_header,
link_with : libdevhelp_static,
include_directories : [ROOT_INCLUDE_DIR],
@@ -91,6 +91,13 @@ libdevhelp = shared_library(
install : true
)
+SHARED_LIBDEVHELP_DECLARED_DEP = declare_dependency(
+ sources : libdevhelp_enum_header,
+ link_with : libdevhelp,
+ include_directories : [ROOT_INCLUDE_DIR, include_directories('.')],
+ dependencies : LIBDEVHELP_DEPS
+)
+
install_headers(
libdevhelp_public_headers,
subdir : install_headers_subdir
diff --git a/meson.build b/meson.build
index 59ffbd8..b9788a6 100644
--- a/meson.build
+++ b/meson.build
@@ -46,10 +46,11 @@ foreach dep : libdevhelp_deps_array
LIBDEVHELP_DEPS += dependency(dep_name, version : dep_version)
endforeach
-#DEVHELP_APP_DEPS = [
-# LIBDEVHELP_DEPS,
-# dependency('gsettings-desktop-schemas')
-#]
+DEVHELP_APP_DEPS = [
+ LIBDEVHELP_DEPS,
+ dependency('gsettings-desktop-schemas'),
+ meson.get_compiler('c').find_library('m')
+]
# config.h
@@ -67,6 +68,10 @@ config_data.set_quoted(
'LOCALEDIR',
join_paths(get_option('prefix'), get_option('localedir'))
)
+config_data.set_quoted(
+ 'PACKAGE_VERSION',
+ meson.project_version()
+)
configure_file(
output : 'config.h',
@@ -142,4 +147,5 @@ add_global_arguments(supported_warning_cflags, language : 'c')
subdir('data')
subdir('devhelp')
+subdir('src')
subdir('unit-tests')
diff --git a/src/meson.build b/src/meson.build
new file mode 100644
index 0000000..336f68c
--- /dev/null
+++ b/src/meson.build
@@ -0,0 +1,21 @@
+devhelp_app_sources = [
+ 'dh-app.c',
+ 'dh-assistant.c',
+ 'dh-main.c',
+ 'dh-preferences.c',
+ 'dh-settings-app.c',
+ 'dh-tab.c',
+ 'dh-tab-label.c',
+ 'dh-util-app.c',
+ 'dh-web-view.c',
+ 'dh-window.c',
+ 'tepl-info-bar.c'
+]
+
+executable(
+ 'devhelp',
+ devhelp_app_sources,
+ include_directories : [CONFIG_H_INCLUDE_DIR, ROOT_INCLUDE_DIR],
+ dependencies : [DEVHELP_APP_DEPS, SHARED_LIBDEVHELP_DECLARED_DEP],
+ install : true
+)
diff --git a/unit-tests/meson.build b/unit-tests/meson.build
index 20e24e2..85f5f67 100644
--- a/unit-tests/meson.build
+++ b/unit-tests/meson.build
@@ -10,7 +10,7 @@ foreach unit_test : unit_tests
unit_test,
unit_test + '.c',
include_directories : ROOT_INCLUDE_DIR,
- dependencies : [LIBDEVHELP_DEPS, LIBDEVHELP_STATIC_DEP]
+ dependencies : [LIBDEVHELP_DEPS, STATIC_LIBDEVHELP_DECLARED_DEP]
)
test(unit_test, exe)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]