[gnome-photos/wip/rishi/buffer-decoder: 1/13] build: Split common code into a private shared library
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos/wip/rishi/buffer-decoder: 1/13] build: Split common code into a private shared library
- Date: Tue, 25 Sep 2018 07:22:21 +0000 (UTC)
commit ccbdb3e536711b6763423c95d84b3c894e59fa18
Author: Debarshi Ray <debarshir gnome org>
Date: Tue Sep 25 09:21:23 2018 +0200
build: Split common code into a private shared library
https://gitlab.gnome.org/GNOME/gnome-photos/issues/63
meson.build | 1 +
src/meson.build | 25 ++++++++++++++++++++++++-
2 files changed, 25 insertions(+), 1 deletion(-)
---
diff --git a/meson.build b/meson.build
index 77f0410f..b51e3200 100644
--- a/meson.build
+++ b/meson.build
@@ -13,6 +13,7 @@ photos_libexecdir = join_paths(photos_prefix, get_option('libexecdir'))
photos_localedir = join_paths(photos_prefix, get_option('localedir'))
photos_docdir = join_paths(photos_datadir, 'doc', meson.project_name())
+photos_libdir = join_paths(photos_prefix, get_option('libdir'), meson.project_name())
photos_installed_test_metadir = join_paths(photos_datadir, 'installed-tests', meson.project_name())
photos_installed_test_execdir = join_paths(photos_libexecdir, 'installed-tests', meson.project_name())
diff --git a/src/meson.build b/src/meson.build
index 88dfc4ba..40843751 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -1,3 +1,24 @@
+sources = files(
+ 'photos-quarks.c',
+)
+
+deps = [
+ glib_dep,
+]
+
+libgnome_photos = shared_library(
+ meson.project_name(),
+ sources,
+ dependencies: deps,
+ include_directories: top_inc,
+ install: true,
+ install_dir: photos_libdir,
+)
+
+libgnome_photos_dep = declare_dependency(
+ link_with: libgnome_photos,
+)
+
common_sources = files(
'photos-debug.c',
'photos-error.c',
@@ -15,7 +36,6 @@ common_sources = files(
'photos-operation-svg-multiply.c',
'photos-pipeline.c',
'photos-png-count.c',
- 'photos-quarks.c',
)
enum_headers = files(
@@ -68,6 +88,7 @@ common_deps = [
glib_dep,
goa_dep,
libdazzle_dep,
+ libgnome_photos_dep,
libjpeg_dep,
libpng_dep,
m_dep,
@@ -363,6 +384,7 @@ executable(
c_args: cflags,
install: true,
install_dir: photos_bindir,
+ install_rpath: photos_libdir,
)
sources = common_sources + files(
@@ -379,4 +401,5 @@ executable(
c_args: cflags,
install: true,
install_dir: photos_libexecdir,
+ install_rpath: photos_libdir,
)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]